author | mickeyl <mickeyl> | 2005-06-02 10:38:42 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-02 10:38:42 (UTC) |
commit | 9d6c759ac1adc5cb654bb3ada6b1d64cddc7217d (patch) (side-by-side diff) | |
tree | 05f7572469fe6c5721b44ed64796bd1104ea3525 /examples | |
parent | b30f28de8d5fa29001bc73a0a0e56ef653f1269f (diff) | |
download | opie-9d6c759ac1adc5cb654bb3ada6b1d64cddc7217d.zip opie-9d6c759ac1adc5cb654bb3ada6b1d64cddc7217d.tar.gz opie-9d6c759ac1adc5cb654bb3ada6b1d64cddc7217d.tar.bz2 |
more work on recursive watches
-rw-r--r-- | examples/opiecore/onotifytest/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opiecore/onotifytest/main.cpp b/examples/opiecore/onotifytest/main.cpp index 8374c59..b773da9 100644 --- a/examples/opiecore/onotifytest/main.cpp +++ b/examples/opiecore/onotifytest/main.cpp @@ -1,66 +1,66 @@ // (C) Michael 'Mickey' Lauer <mickey@Vanille.de> // LICENSE = "GPLv2" #include "main.h" /* OPIE */ #include <opie2/odebug.h> #include <opie2/oapplication.h> #include <opie2/ofilenotify.h> using namespace Opie::Core; /* QT */ #include <qdir.h> #include <qpushbutton.h> #include <qstringlist.h> #include <qtextstream.h> #include <qmessagebox.h> App::App( int argc, char** argv ) : QApplication( argc, argv ) { odebug << "App()" << oendl; #if 0 tmpfoo = new OFile( "/tmp/foo" ); if ( tmpfoo->open( IO_ReadWrite ) ) { QTextStream stream( tmpfoo ); stream << "This is my content"; } QObject::connect( tmpfoo, SIGNAL(accessed(const QString&)), this, SLOT(quit()) ); QObject::connect( tmpfoo, SIGNAL(closed(const QString&,bool)), this, SLOT(quit()) ); #endif ODirNotification* tmpfoo = new ODirNotification( 0, 0 ); - int result = tmpfoo->watch( "/tmp/foo", false, CreateFile, 1 ); + int result = tmpfoo->watch( "/tmp/foo", false, CreateFile, 2 ); QObject::connect( tmpfoo, SIGNAL(triggered(const QString&,unsigned int,const QString&)), this, SLOT(triggered(const QString&,unsigned int,const QString&)) ); } App::~App() { odebug << "~App()" << oendl; } void App::triggered( const QString& str1, unsigned int id, const QString& str2 ) { QMessageBox::information( qApp->desktop(), "info", QString( "%1\n%2\n%3" ).arg( str1 ).arg( id ).arg( str2 ) ); } int main( int argc, char** argv ) { App* app = new App( argc, argv ); QPushButton* b = new QPushButton( "Click me to close", 0 ); QObject::connect( b, SIGNAL(clicked()), qApp, SLOT(quit()) ); b->resize( 200, 200 ); b->move( 150, 150 ); b->show(); app->setMainWidget( b ); app->exec(); delete app; return 0; } |