<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Ram & ianaré,<br><br>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).<br><br>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?<br><br>Thanks & Regards,<br>Sudheer<br><br>P.S: Sometimes 2 cents is worth more than a million :)<br><br>> Date: Fri, 7 May 2010 10:54:15 -0400<br>> Subject: Re: Noob question re Qt Application structure<br>> From: ianare@gmail.com<br>> To: rkmaemo@gmx.com<br>> CC: scifi.guy@hotmail.com; maemo-developers@maemo.org<br>> <br>> I second that opinion. Subclassing by functionality is definitely good<br>> for a single app, but if you need to have the two parts running at<br>> different times a daemon app and a GUI app is the way to go.<br>> <br>> Another option you could use to interact with your two apps is through<br>> dbus itself, ince you will already be using that kind of code.<br>> <br>> - ianaré sévi<br>> <br>> <br>> <br>> 2010/5/7 Ram Kurvakat <rkmaemo@gmx.com>:<br>> > just my 2 pence worth.<br>> ><br>> > you should perhaps try to make 2 different apps for it.<br>> ><br>> > 1 which runs as a daemon and invoked on startup using an upstart script.<br>> ><br>> > and the other a GUI based app , that can interact with your daemon, via<br>> > files, sockets, any which way.<br>> ><br>> > cheers<br>> ><br>> > Ram<br>> ><br>> > ----- Original Message -----<br>> ><br>> > From: Scifi Guy<br>> ><br>> > Sent: 05/07/10 03:26 PM<br>> ><br>> > To: maemo-developers@maemo.org<br>> ><br>> > Subject: Noob question re Qt Application structure<br>> ><br>> > Hi All,<br>> ><br>> > I am developing a Qt4.6 based application that monitors outgoing<br>> > international calls (by connecting to relevant DBUS signals) and routes<br>> > them via a calling card number. I have developed a configuration UI widget<br>> > (QWidget subclass) to enable/disable such routing.<br>> > The problem is that the UI widget code and DBUS slots code are all in the<br>> > same class. If I launch the application, the UI widget is shown.<br>> ><br>> > This is the code in my main.cpp.<br>> ><br>> ><br>> > #include <QtGui/QApplication><br>> > #include "eventmonitor.h"<br>> > #include <QDebug><br>> ><br>> > int main(int argc, char *argv[])<br>> > {<br>> ><br>> > QApplication a(argc, argv);<br>> > EventMonitor w;<br>> > w.show();<br>> > return a.exec();<br>> > }<br>> ><br>> ><br>> > EventMonitor is a QWidget subclass which also has functions to connect to<br>> > DBUS signals. My aim is to separate the functionality into two different<br>> > classes. The class with DBus slots should be running as a daemon which is<br>> > invoked on startup.<br>> > The class with QWidget (config screen) should be invoked when user launches<br>> > the app from the applications menu. Think on the lines of AutoDisconnect.<br>> ><br>> > What is the best way to achieve this? Let me know if you want me to post<br>> > more code.<br>> ><br>> ><br>> > Thanks & Regards,<br>> > Sudheer<br>> > ________________________________<br>> > The New Busy is not the old busy. Search, chat and e-mail from your inbox.<br>> > Get started.<br>> ><br>> ><br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > maemo-developers mailing list<br>> > maemo-developers@maemo.org<br>> > https://lists.maemo.org/mailman/listinfo/maemo-developers<br>> ><br>> ><br>                                            <br /><hr />Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2' target='_new'>See how.</a></body>
</html>