[maemo-developers] Noob question re Qt Application structure
From: Scifi Guy scifi.guy at hotmail.comDate: Fri May 7 18:24:06 EEST 2010
- Previous message: Noob question re Qt Application structure
- Next message: Noob question re Qt Application structure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Ram & ianaré, Thank you for the response. Creating two apps makes sense. I was trying to avoid user having to install two apps for one feature. But it is not a big deal i guess (If i set the dependencies properly). Here is another question though. How I do launch/kill the daemon app from the GUI app? This is required when user chooses enable/disable application from GUI app. I can exit the daemon by receiving a custom DBUS signal but how do I launch it? Thanks & Regards, Sudheer P.S: Sometimes 2 cents is worth more than a million :) > Date: Fri, 7 May 2010 10:54:15 -0400 > Subject: Re: Noob question re Qt Application structure > From: ianare at gmail.com > To: rkmaemo at gmx.com > CC: scifi.guy at hotmail.com; maemo-developers at maemo.org > > I second that opinion. Subclassing by functionality is definitely good > for a single app, but if you need to have the two parts running at > different times a daemon app and a GUI app is the way to go. > > Another option you could use to interact with your two apps is through > dbus itself, ince you will already be using that kind of code. > > - ianaré sévi > > > > 2010/5/7 Ram Kurvakat <rkmaemo at gmx.com>: > > just my 2 pence worth. > > > > you should perhaps try to make 2 different apps for it. > > > > 1 which runs as a daemon and invoked on startup using an upstart script. > > > > and the other a GUI based app , that can interact with your daemon, via > > files, sockets, any which way. > > > > cheers > > > > Ram > > > > ----- Original Message ----- > > > > From: Scifi Guy > > > > Sent: 05/07/10 03:26 PM > > > > To: maemo-developers at maemo.org > > > > Subject: Noob question re Qt Application structure > > > > Hi All, > > > > I am developing a Qt4.6 based application that monitors outgoing > > international calls (by connecting to relevant DBUS signals) and routes > > them via a calling card number. I have developed a configuration UI widget > > (QWidget subclass) to enable/disable such routing. > > The problem is that the UI widget code and DBUS slots code are all in the > > same class. If I launch the application, the UI widget is shown. > > > > This is the code in my main.cpp. > > > > > > #include <QtGui/QApplication> > > #include "eventmonitor.h" > > #include <QDebug> > > > > int main(int argc, char *argv[]) > > { > > > > QApplication a(argc, argv); > > EventMonitor w; > > w.show(); > > return a.exec(); > > } > > > > > > EventMonitor is a QWidget subclass which also has functions to connect to > > DBUS signals. My aim is to separate the functionality into two different > > classes. The class with DBus slots should be running as a daemon which is > > invoked on startup. > > The class with QWidget (config screen) should be invoked when user launches > > the app from the applications menu. Think on the lines of AutoDisconnect. > > > > What is the best way to achieve this? Let me know if you want me to post > > more code. > > > > > > Thanks & Regards, > > Sudheer > > ________________________________ > > The New Busy is not the old busy. Search, chat and e-mail from your inbox. > > Get started. > > > > > > > > > > > > _______________________________________________ > > maemo-developers mailing list > > maemo-developers at maemo.org > > https://lists.maemo.org/mailman/listinfo/maemo-developers > > > > _________________________________________________________________ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.maemo.org/pipermail/maemo-developers/attachments/20100507/2ab7f13c/attachment.htm>
- Previous message: Noob question re Qt Application structure
- Next message: Noob question re Qt Application structure
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]