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