author | mickeyl <mickeyl> | 2005-02-04 16:36:03 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-02-04 16:36:03 (UTC) |
commit | 5398d63dbd79eb166ab1c36517f60c6e850a2ca7 (patch) (side-by-side diff) | |
tree | 503eb66f8295f4592c1fb2029c6ab0fa2225a2aa | |
parent | 41886a2bfe003d715ad8fe48011d054c2ba0a779 (diff) | |
download | opie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.zip opie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.tar.gz opie-5398d63dbd79eb166ab1c36517f60c6e850a2ca7.tar.bz2 |
improve coding style
-rw-r--r-- | examples/opiecore/onotifydemo/onotifydemo.cpp | 30 | ||||
-rw-r--r-- | examples/opiecore/onotifydemo/onotifydemo.h | 29 | ||||
-rw-r--r-- | examples/opiecore/onotifydemo/onotifydemo.pro | 2 |
3 files changed, 39 insertions, 22 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 +1,3 @@ +#include "onotifydemo.h" + /* OPIE */ @@ -18,7 +20,3 @@ using namespace Opie::Ui; -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" ) { @@ -72,4 +70,3 @@ public: -public: - void addTrigger( bool multi = false ) + void DemoApp::addTrigger( bool multi ) { @@ -102,8 +99,7 @@ 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() { @@ -122,3 +118,3 @@ public slots: - void trigger() + void DemoApp::trigger() { @@ -127,9 +123,2 @@ public slots: -private: - OListView* l; - QButtonGroup* g1; - QButtonGroup* g2; - OFileNotificationType m; -}; - int main( int argc, char** argv ) @@ -143,2 +132 @@ int main( int argc, char** argv ) -#include "moc/onotifydemo.moc" diff --git a/examples/opiecore/onotifydemo/onotifydemo.h b/examples/opiecore/onotifydemo/onotifydemo.h new file mode 100644 index 0000000..c4e3456 --- a/dev/null +++ b/examples/opiecore/onotifydemo/onotifydemo.h @@ -0,0 +1,29 @@ +/* OPIE */ +#include <opie2/olistview.h> +#include <opie2/odebug.h> +#include <opie2/oapplication.h> +#include <opie2/ofilenotify.h> + +class QButtonGroup; + +class DemoApp : public Opie::Core::OApplication +{ + Q_OBJECT +public: + DemoApp( int argc, char** argv ); + +public: + void addTrigger( bool multi = false ); +public slots: + void modifierClicked( int modifier ); + void addSingle(); + void addMulti(); + void delTrigger(); + void trigger(); + +private: + Opie::Ui::OListView* l; + QButtonGroup* g1; + QButtonGroup* g2; + Opie::Core::OFileNotificationType m; +}; diff --git a/examples/opiecore/onotifydemo/onotifydemo.pro b/examples/opiecore/onotifydemo/onotifydemo.pro index 1c1040c..8e7e487 100644 --- a/examples/opiecore/onotifydemo/onotifydemo.pro +++ b/examples/opiecore/onotifydemo/onotifydemo.pro @@ -2,3 +2,3 @@ TEMPLATE = app CONFIG = qt warn_on -HEADERS = +HEADERS = onotifydemo.h SOURCES = onotifydemo.cpp |