[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Starting out in KDE and GUI Building
From:       lordSauron <lordsauronthegreat () gmail ! com>
Date:       2005-10-17 0:22:25
Message-ID: e5a3e9ac0510161722s582d1ec1v26ccb24f72660294 () mail ! gmail ! com
[Download RAW message or body]

On 10/15/05, tnagyemail-ml@yahoo.fr <tnagyemail-ml@yahoo.fr> wrote:
> kdevelop templates. Generate an application and add
> features to it.

how?  No, seriously.  Beyond Java I've no actual UI experience, and I
took your advice and made a template program using KDevelop, but after
chewing on the API docs for a while only succeeded in making myself
very confused.

I guess a good question to ask would be the lifecycle of a KDE
application.  I didn't see a int main ( ); calling the window class
that extended KMainWindow.  I compiled and it didn't appear that
anything happened (perhaps due to the abscence of a main() function?)

I think I have a pretty fuzzy idea of how this all works, but most of
it's wrong.  However, it looks customisable enough to be a very
powerful tool (unlike Java, where if you need a button just a bit
differently you must be a heretic to not be making a multi-platform
database app...  man, my brain still hurts from that...) and I'd just
like to warn you that I'm not kidding when I say I'm a slow learer: I
will have to understand everything.  Furthermore, I'm not a
super-genius savant-type person, so I need information in little bits
otherwise I don't get it.  The how-to was useful, though told me
absolutely nothing about how to make a application, and the API
documentation was basically assuming that I was a seasoned veteran
with a brainfreeze (rather, I was a green newbie with a brainfreeze
iced with a slight headache...)

So, I know it's probably going to be painful for you people, but I
think you'll have to walk me through the basics (I'm reletively
competent with C and am learning C++'s OO sytnaxing rapidly, so it's
not all bad...  now all I need to do is survive this UI stuff and then
it should be clear sailing...)  One thing is for sure: after this is
all done, I'm building a walkthrough for those who've never even known
Java (but assuming that they're somewhat competent with C++, of
course)

So, for my first mind-numbingly simple question, what's going on? 
This is the nice and dainty little program the template made for me:

#include "amino.h"

#include <qlabel.h>

#include <kmainwindow.h>
#include <klocale.h>

amino :: amino() : KMainWindow (0, "amino") {
    // set the shell's ui resource file
    setXMLFile("aminoui.rc");

    new QLabel( "Hello World", this, "hello label" );
}

amino :: ~amino() {

}

#include "amino.moc"

that was amino.cpp.  I don't think that the other files are terribly
necessary to send you, since you're all probably able to tell what
they contain by looking at the above anyway.

I understood this program all the way up to line 0 (which was blank). 
I have no clue why it needs to include amino.h I have no clue, though
it looked to contain a class of some sort...  I also don't understand
the part about making a new QLabel...  It's unnamed (as a object is, I
think...) and I've absolutely no idea how this all fits into program
control flow.

So if any of you are up to a small and painfully detailed and simple
crash-course in basic widget-ology pertaining to KDE, I'd really
appreciate it ( or if there's another resource that's better suited to
what I'm looking for, that'd be great too.0
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic