summaryrefslogtreecommitdiff
path: root/examples/opiecore/onotifydemo/onotifydemo.cpp
authormickeyl <mickeyl>2005-02-04 16:36:03 (UTC)
committer mickeyl <mickeyl>2005-02-04 16:36:03 (UTC)
commit5398d63dbd79eb166ab1c36517f60c6e850a2ca7 (patch) (side-by-side diff)
tree503eb66f8295f4592c1fb2029c6ab0fa2225a2aa /examples/opiecore/onotifydemo/onotifydemo.cpp
parent41886a2bfe003d715ad8fe48011d054c2ba0a779 (diff)
downloadopie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.zip
opie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.tar.gz
opie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.tar.bz2
improve coding style
Diffstat (limited to 'examples/opiecore/onotifydemo/onotifydemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opiecore/onotifydemo/onotifydemo.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/examples/opiecore/onotifydemo/onotifydemo.cpp b/examples/opiecore/onotifydemo/onotifydemo.cpp
index b9ff9db..a38ffee 100644
--- a/examples/opiecore/onotifydemo/onotifydemo.cpp
+++ b/examples/opiecore/onotifydemo/onotifydemo.cpp
@@ -1,3 +1,5 @@
+#include "onotifydemo.h"
+
/* OPIE */
#include <opie2/odebug.h>
#include <opie2/oapplication.h>
@@ -16,11 +18,7 @@ using namespace Opie::Ui;
#include <qmessagebox.h>
#include <qpushbutton.h>
-class DemoApp : public OApplication
-{
- Q_OBJECT
-public:
- DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 notify demo" )
+DemoApp::DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 notify demo" )
{
QVBox* vbox = new QVBox();
@@ -70,8 +68,7 @@ public:
showMainWidget( vbox );
}
-public:
- void addTrigger( bool multi = false )
+ void DemoApp::addTrigger( bool multi )
{
if ( !m )
{
@@ -100,12 +97,11 @@ public:
}
}
-public slots:
- void modifierClicked( int modifier ) { m = static_cast<OFileNotificationType>( (int)m ^ int(modifier) ); };
- void addSingle() { addTrigger(); };
- void addMulti() { addTrigger( true ); };
+ void DemoApp::modifierClicked( int modifier ) { m = static_cast<OFileNotificationType>( (int)m ^ int(modifier) ); };
+ void DemoApp::addSingle() { addTrigger(); };
+ void DemoApp::addMulti() { addTrigger( true ); };
- void delTrigger()
+ void DemoApp::delTrigger()
{
QListViewItem* item = l->selectedItem();
if ( !item )
@@ -120,18 +116,11 @@ public slots:
}
}
- void trigger()
+ void DemoApp::trigger()
{
owarn << "FIRE!" << oendl;
}
-private:
- OListView* l;
- QButtonGroup* g1;
- QButtonGroup* g2;
- OFileNotificationType m;
-};
-
int main( int argc, char** argv )
{
DemoApp* app = new DemoApp( argc, argv );
@@ -141,4 +130,3 @@ int main( int argc, char** argv )
}
-#include "moc/onotifydemo.moc"