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

List:       kde-devel
Subject:    Re: KSysTray not exiting and various programming questions
From:       Michael Pyne <pynm0001 () comcast ! net>
Date:       2004-03-31 4:10:19
Message-ID: 200403302310.25219.pynm0001 () comcast ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 30 March 2004 22:54, Nathan Toone wrote:
> This works fine - and it displays my icon.  When I right click, I get the
> menu option for "Quit".  However, when I click on "Quit", the icon
> disappears, but the process continues running.

KDE applications are based on the Qt toolkit.  The Qt toolkit employs the idea 
of signals which can be connected to slots by a program.  The signal doesn't 
know what it's connected to, and slots don't know what connects to it.  It's 
a very powerful metaphor for modeling user interaction.

What you need to do is connect the quit signal emitted by the system tray icon 
to your application's quit signal.

An example from JuK:
connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotQuit()));

You probably will do something like:
connect (&sysTray, SIGNAL(quitSelected()), &app, SLOT(quit()));

Also, you should normally create Qt objects by using the new operator.  If you 
pass the parent of the object in question, you should never need to worry 
about deleting it.  But please review resource management anyways, it's not 
just for memory. ;-)

> How do I set up my build system (Makefiles, configure, etc)?  I'm just
> compiling stuff by hand (well, with a shell script) but all my paths are
> hard-coded etc.

You need to use the autotools.  KDevelop makes it easy, but if you like to do 
it from the command line, you'll need to have Makefile.am files for the most 
part.  I really can't work the whole spiel into this message, but there is a 
HOWTO at: http://developer.kde.org/documentation/other/makefile_am_howto.html

It only covers the Makefile.am part, not actually creating the build system.  
The best place to cover that would probably be the CVS howto: 
http://wiki.kdenews.org/tiki-index.php?page=KDE%20CVS%20Step%20by%20Step

Good luck!

Regards,
 - Michael Pyne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAakSvqjQYp5Omm0oRAiF5AJ47sJscp/zROe2uR+EvKseFt7tTLACfbmtQ
19dVf/EhHPv3zWJE7Ko+PlA=
=TcYU
-----END PGP SIGNATURE-----
 
>> 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