author | mickeyl <mickeyl> | 2005-01-29 14:23:27 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-01-29 14:23:27 (UTC) |
commit | 20b3de56573b9e86c6b6041faf684adc8cbb2a45 (patch) (side-by-side diff) | |
tree | e0d91c84dee46d1cce3b0d68fd2c10c3dd7ce3a1 | |
parent | 555b999359a5aad999eaaf48632ce85f25125b85 (diff) | |
download | opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.zip opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.gz opie-20b3de56573b9e86c6b6041faf684adc8cbb2a45.tar.bz2 |
examples to where they belong
95 files changed, 1 insertions, 2688 deletions
diff --git a/libopie2/examples/opieui/olistviewdemo/.cvsignore b/examples/opieui/olistviewdemo/.cvsignore index 3983e82..3983e82 100644 --- a/libopie2/examples/opieui/olistviewdemo/.cvsignore +++ b/examples/opieui/olistviewdemo/.cvsignore diff --git a/libopie2/examples/opieui/osplitter_example/.cvsignore b/examples/opieui/osplitter_example/.cvsignore index e4ebfe9..e4ebfe9 100644 --- a/libopie2/examples/opieui/osplitter_example/.cvsignore +++ b/examples/opieui/osplitter_example/.cvsignore diff --git a/libopie2/examples/.cvsignore b/examples/opieui/oversatileviewdemo/.cvsignore index 8f7300c..8f7300c 100644 --- a/libopie2/examples/.cvsignore +++ b/examples/opieui/oversatileviewdemo/.cvsignore diff --git a/libopie2/examples/opieui/owidgetstack_example/.cvsignore b/examples/opieui/owidgetstack_example/.cvsignore index 4911782..4911782 100644 --- a/libopie2/examples/opieui/owidgetstack_example/.cvsignore +++ b/examples/opieui/owidgetstack_example/.cvsignore diff --git a/libopie2/examples/config.in b/libopie2/examples/config.in deleted file mode 100644 index e9e8946..0000000 --- a/libopie2/examples/config.in +++ b/dev/null @@ -1,6 +0,0 @@ - config LIBOPIE2EXAMPLES - boolean "libopie2 examples" - default "n" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB && LIBOPIE2NET && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM - comment "the examples need a libqpe, libopie2core, libopie2db, libopie2net, libopie2pim, libopie2ui and libopie2mm" - depends !(( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2DB && LIBOPIE2NET && LIBOPIE2PIM && LIBOPIE2UI && LIBOPIE2MM) diff --git a/libopie2/examples/examples.pro b/libopie2/examples/examples.pro deleted file mode 100644 index 192c1f5..0000000 --- a/libopie2/examples/examples.pro +++ b/dev/null @@ -1,12 +0,0 @@ -TEMPLATE = subdirs -unix:SUBDIRS = opieui opienet opiecore opiemm opiedb - - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - diff --git a/libopie2/examples/opiecore/.cvsignore b/libopie2/examples/opiecore/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opiecore/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/oconfigdemo/.cvsignore b/libopie2/examples/opiecore/oconfigdemo/.cvsignore deleted file mode 100644 index db3635b..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -oconfigdemo -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp deleted file mode 100644 index 2ee4a65..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.cpp +++ b/dev/null @@ -1,32 +0,0 @@ -#include <opie2/oapplication.h> -#include <opie2/oconfig.h> -#include <qpe/config.h> - -using namespace Opie::Core; - -int main( int argc, char** argv ) -{ - OApplication* app = new OApplication( argc, argv, "MyConfigDemoApplication" ); - - OConfigGroupSaver c1( app->config(), "MyGroup" ); - app->config()->writeEntry( "AnEntry", "InMyGroup" ); - { - OConfigGroupSaver c2( c1.config(), "AnotherGroup" ); - app->config()->writeEntry( "AnEntry", "InAnotherGroup" ); - } // closing the scope returns to the last group - - app->config()->writeEntry( "AnotherEntry", "InMyGroup" ); - - // do more stuff ... - - // in this (special) case it is necessary to manually call OConfig::write() (see below) - app->config()->write(); - - // can't delete the app when using the OConfigGroupSaver on top level scope, - // because the destructor of the OConfigGroupSaver needs an application object - //delete app; // destructor deletes config which writes changes back to disk - - return 0; - -} - diff --git a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro b/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro deleted file mode 100644 index b29c106..0000000 --- a/libopie2/examples/opiecore/oconfigdemo/oconfigdemo.pro +++ b/dev/null @@ -1,18 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = oconfigdemo.cpp - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -TARGET = oconfigdemo - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - diff --git a/libopie2/examples/opiecore/odebugdemo/.cvsignore b/libopie2/examples/opiecore/odebugdemo/.cvsignore deleted file mode 100644 index 731667d..0000000 --- a/libopie2/examples/opiecore/odebugdemo/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -odebugdemo -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp b/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp deleted file mode 100644 index b046d28..0000000 --- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.cpp +++ b/dev/null @@ -1,142 +0,0 @@ -/* QT */ - -#include <qvbox.h> -#include <qhbox.h> -#include <qvbuttongroup.h> -#include <qhbuttongroup.h> -#include <qlineedit.h> -#include <qradiobutton.h> -#include <qpushbutton.h> - -/* OPIE */ - -#include <qpe/config.h> - -#include <opie2/odebug.h> -#include <opie2/oapplication.h> -#include <opie2/oglobal.h> -#include <opie2/oglobalsettings.h> - -using namespace Opie::Core; - -class DemoApp : public OApplication -{ -Q_OBJECT -public: - DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 debug demo" ) - { - // you have access to your OApplication object via oApp - odebug << "Process-wide OApplication object @ " << oApp << "" << oendl; - - // you have access to global settings via OGlobalSettings - int mode = OGlobalSettings::debugMode(); - - QVBox* vbox = new QVBox(); - setMainWidget( vbox ); - - g = new QVButtonGroup( "Output Strategy", vbox ); - QRadioButton* r0 = new QRadioButton( "file", g ); - QRadioButton* r1 = new QRadioButton( "messagebox", g ); - QRadioButton* r2 = new QRadioButton( "stderr", g ); - QRadioButton* r3 = new QRadioButton( "syslog", g ); - QRadioButton* r4 = new QRadioButton( "socket", g ); - g->insert( r0, 0 ); - g->insert( r1, 1 ); - g->insert( r2, 2 ); - g->insert( r3, 3 ); - g->insert( r4, 4 ); - g->setRadioButtonExclusive( true ); - connect( g, SIGNAL( clicked(int) ), this, SLOT( chooseMethod(int) ) ); - - if ( mode != -1 ) g->setButton( mode ); - - QHButtonGroup* hbox = new QHButtonGroup( "Extra Output Information", vbox ); - e = new QLineEdit( hbox ); - QPushButton* pb = new QPushButton( hbox ); - - connect( e, SIGNAL( returnPressed() ), this, SLOT( updateDebugOutput() ) ); - connect( pb, SIGNAL( clicked() ), this, SLOT( updateDebugOutput() ) ); - - // show the additional debug mode dependent output information - e->setText( OGlobalSettings::debugOutput() ); - - // buttos - QPushButton* info = new QPushButton( "Emit Debug(Info) Output!", vbox ); - connect( info, SIGNAL( clicked() ), this, SLOT( emitInfoOutput() ) ); - QPushButton* warn = new QPushButton( "Emit a Warning Output!", vbox ); - connect( warn, SIGNAL( clicked() ), this, SLOT( emitWarningOutput() ) ); - QPushButton* error = new QPushButton( "Emit an Error Output!", vbox ); - connect( error, SIGNAL( clicked() ), this, SLOT( emitErrorOutput() ) ); - QPushButton* fatal = new QPushButton( "Emit a Fatal Output!", vbox ); - connect( fatal, SIGNAL( clicked() ), this, SLOT( emitFatalOutput() ) ); - - QPushButton* tb = new QPushButton( "Emit a Fatal Backtrace!", vbox ); - connect( tb, SIGNAL( clicked() ), this, SLOT( emitTBOutput() ) ); - - info->show(); - warn->show(); - error->show(); - fatal->show(); - tb->show(); - g->show(); - hbox->show(); - e->show(); - vbox->show(); - showMainWidget( vbox ); - } - -public slots: - void chooseMethod(int method) - { - m = method; - odebug << "choosing method: " << method << "" << oendl; - OConfig* g = OGlobal::config(); - g->setGroup( "General" ); - g->writeEntry( "debugMode", m ); - e->setText( OGlobalSettings::debugOutput() ); - g->write(); - } - void updateDebugOutput() - { - OConfig* g = OGlobal::config(); - g->setGroup( "General" ); - g->writeEntry( "debugOutput"+QString::number(OGlobalSettings::debugMode()), e->text() ); - g->write(); - } - void emitInfoOutput() - { - odebug << "This is a debug message" << oendl; - } - void emitWarningOutput() - { - owarn << "This is a warning message" << oendl; - } - void emitErrorOutput() - { - oerr << "This is an errror message" << oendl; - } - void emitFatalOutput() - { - ofatal << "This is a fatal message" << oendl; - } - void emitTBOutput() - { - ofatal << "This is a fatal message + backtrace\n" + odBacktrace(); // odBacktrace includes \n - } - -private: - QButtonGroup* g; - int m; - QLineEdit* e; -}; - -int main( int argc, char** argv ) -{ - DemoApp* app = new DemoApp( argc, argv ); - app->exec(); - - return 0; - -} - -#include "odebugdemo.moc" diff --git a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro b/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro deleted file mode 100644 index e06053c..0000000 --- a/libopie2/examples/opiecore/odebugdemo/odebugdemo.pro +++ b/dev/null @@ -1,17 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = odebugdemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -TARGET = odebugdemo - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore b/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore deleted file mode 100644 index d564c61..0000000 --- a/libopie2/examples/opiecore/oglobalsettingsdemo/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -oglobalsettingsdemo -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp deleted file mode 100644 index 37bcf13..0000000 --- a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.cpp +++ b/dev/null @@ -1,15 +0,0 @@ -#include <opie2/oglobalsettings.h> -#include <stdio.h> - -using namespace Opie::Core; - -int main( int argc, char** argv ) -{ - printf( "current debugmode seems to be '%d'\n", OGlobalSettings::debugMode() ); - printf( "output information for this mode is '%s'\n", (const char*) OGlobalSettings::debugOutput() ); - - return 0; - -} - -//#include "moc/oconfigdemo.moc" diff --git a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro b/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro deleted file mode 100644 index d7bed05..0000000 --- a/libopie2/examples/opiecore/oglobalsettingsdemo/oglobalsettingsdemo.pro +++ b/dev/null @@ -1,14 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = oglobalsettingsdemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -TARGET = oglobalsettingsdemo -MOC_DIR = moc -OBJECTS_DIR = obj - -include( $(OPIEDIR)/include.pro ) - - diff --git a/libopie2/examples/opiecore/okeyconfigmanager/README b/libopie2/examples/opiecore/okeyconfigmanager/README deleted file mode 100644 index 327b7c2..0000000 --- a/libopie2/examples/opiecore/okeyconfigmanager/README +++ b/dev/null @@ -1 +0,0 @@ -See opieui/okeyconfigwidget for an example of possible usage
\ No newline at end of file diff --git a/libopie2/examples/opiecore/onotifydemo/.cvsignore b/libopie2/examples/opiecore/onotifydemo/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opiecore/onotifydemo/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp b/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp deleted file mode 100644 index b9ff9db..0000000 --- a/libopie2/examples/opiecore/onotifydemo/onotifydemo.cpp +++ b/dev/null @@ -1,144 +0,0 @@ -/* OPIE */ -#include <opie2/odebug.h> -#include <opie2/oapplication.h> -#include <opie2/ofiledialog.h> -#include <opie2/olistview.h> -#include <opie2/ofilenotify.h> -using namespace Opie::Core; -using namespace Opie::Ui; - -/* QT */ -#include <qcheckbox.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qhbuttongroup.h> -#include <qvbuttongroup.h> -#include <qmessagebox.h> -#include <qpushbutton.h> - -class DemoApp : public OApplication -{ - Q_OBJECT -public: - DemoApp( int argc, char** argv ) : OApplication( argc, argv, "libopie2 notify demo" ) - { - - QVBox* vbox = new QVBox(); - setMainWidget( vbox ); - - l = new OListView( vbox ); - l->addColumn( "Notification Path" ); - l->addColumn( "Trigger Type" ); - l->addColumn( "Trigger Mask" ); - l->setColumnAlignment( 1, AlignCenter ); - l->setColumnAlignment( 2, AlignCenter ); - - QHBox* hbox = new QHBox( vbox ); - - g2 = new QVButtonGroup( "Specify Trigger Type", hbox ); - //QCheckBox* c1 = new QCheckBox( "Multi", g2 ); - QCheckBox* c2 = new QCheckBox( "Access", g2 ); - QCheckBox* c3 = new QCheckBox( "Modify", g2 ); - QCheckBox* c4 = new QCheckBox( "Create", g2 ); - QCheckBox* c5 = new QCheckBox( "Delete", g2 ); - QCheckBox* c6 = new QCheckBox( "Rename", g2 ); - QCheckBox* c7 = new QCheckBox( "Attrib", g2 ); - g2->insert( c2, Access ); - g2->insert( c3, Modify ); - g2->insert( c4, Create ); - g2->insert( c5, Delete ); - g2->insert( c6, Rename ); - g2->insert( c7, Attrib ); - connect( g2, SIGNAL( pressed(int) ), this, SLOT( modifierClicked(int) ) ); - - g1 = new QVButtonGroup( "Add/Remove", hbox ); - QPushButton* plus1 = new QPushButton( "Add\n&Single", g1 ); - QPushButton* plus2 = new QPushButton( "Add\n&Multi", g1 ); - QPushButton* minus = new QPushButton( "&Remove\nIt!", g1 ); - g1->insert( plus1, 0 ); - g1->insert( plus2, 1 ); - g1->insert( minus, 2 ); - connect( plus1, SIGNAL( clicked() ), this, SLOT( addSingle() ) ); - connect( plus2, SIGNAL( clicked() ), this, SLOT( addMulti() ) ); - connect( minus, SIGNAL( clicked() ), this, SLOT( delTrigger() ) ); - - g1->show(); - g2->show(); - l->show(); - hbox->show(); - vbox->show(); - showMainWidget( vbox ); - } - -public: - void addTrigger( bool multi = false ) - { - if ( !m ) - { - QMessageBox::warning( 0, "Add Trigger", "<p>Can't add trigger without at least one selected trigger type</p>", "&Sorry", 0 ); - return; - } - - QString filename = OFileDialog::getOpenFileName( OFileSelector::ExtendedAll ); - if ( !filename.isEmpty() ) - { - odebug << "Filename = " << filename << oendl; - - int fntype = m; - if ( multi ) fntype |=(int) Multi; - - QString modifier = QString().sprintf( " = 0x%08x", fntype ); - new OListViewItem( l, filename, multi ? "MULTI" : "SINGLE", modifier ); - if ( !multi ) - OFileNotification::singleShot( filename, this, SLOT( trigger() ), (OFileNotificationType) fntype ); - else - OFileNotification::singleShot( filename, this, SLOT( trigger() ), (OFileNotificationType) fntype ); - } - else - { - odebug << "cancelled." << oendl; - } - } - -public slots: - void modifierClicked( int modifier ) { m = static_cast<OFileNotificationType>( (int)m ^ int(modifier) ); }; - void addSingle() { addTrigger(); }; - void addMulti() { addTrigger( true ); }; - - void delTrigger() - { - QListViewItem* item = l->selectedItem(); - if ( !item ) - { - QMessageBox::warning( 0, "Del Trigger", "<p>No trigger selected!</p>", "&Sorry", 0 ); - return; - } - else - { - QString filename( item->text( 0 ) ); - odebug << "Filename = " << filename << oendl; - } - } - - void 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 ); - app->exec(); - - return 0; - -} - -#include "moc/onotifydemo.moc" diff --git a/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro b/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro deleted file mode 100644 index d2c9138..0000000 --- a/libopie2/examples/opiecore/onotifydemo/onotifydemo.pro +++ b/dev/null @@ -1,18 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = onotifydemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -lopieui2 -TARGET = onotifydemo - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - -MOC_DIR = moc diff --git a/libopie2/examples/opiecore/opiecore.pro b/libopie2/examples/opiecore/opiecore.pro deleted file mode 100644 index 39ffd3b..0000000 --- a/libopie2/examples/opiecore/opiecore.pro +++ b/dev/null @@ -1,2 +0,0 @@ -TEMPLATE = subdirs -unix:SUBDIRS = odebugdemo oconfigdemo oglobalsettingsdemo onotifydemo oprocessdemo oplugins diff --git a/libopie2/examples/opiecore/oplugins/.cvsignore b/libopie2/examples/opiecore/oplugins/.cvsignore deleted file mode 100644 index 514e011..0000000 --- a/libopie2/examples/opiecore/oplugins/.cvsignore +++ b/dev/null @@ -1,3 +0,0 @@ -oplugins -Makefile -.moc diff --git a/libopie2/examples/opiecore/oplugins/oplugins.cpp b/libopie2/examples/opiecore/oplugins/oplugins.cpp deleted file mode 100644 index 26623be..0000000 --- a/libopie2/examples/opiecore/oplugins/oplugins.cpp +++ b/dev/null @@ -1,47 +0,0 @@ -/* - * You may copy, modify and or distribute without any limitation - */ -#include <opie2/odebug.h> -#include <opie2/opluginloader.h> - -#include <opie2/todayplugininterface.h> - -using Opie::Core::OPluginItem; -using Opie::Core::OGenericPluginLoader; -using Opie::Core::OPluginLoader; - -void debugLst( const OPluginItem::List& lst ) { - for ( OPluginItem::List::ConstIterator it = lst.begin(); it != lst.end(); ++it ) - odebug << "Name " << (*it).name() << " " << (*it).path() << " " << (*it).position() << oendl; -} - - -int main( void ) { - OGenericPluginLoader loader( "today", true ); - loader.setAutoDelete( true ); - - odebug << "IS in Safe Mode" << loader.isInSafeMode() << oendl; - - OPluginItem::List lst = loader.allAvailable( true ); - debugLst( lst ); - - lst = loader.filtered( true ); - debugLst( lst ); - - for ( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ) { - QUnknownInterface* iface = loader.load( *it, IID_TodayPluginInterface ); - } - - OPluginLoader loader2("today",true); - OPluginItem::List lst2 = loader2.allAvailable( true ); - debugLst( lst2 ); - - for( OPluginItem::List::Iterator it = lst.begin(); it != lst.end(); ++it ){ - TodayPluginInterface* iface = loader2.load<TodayPluginInterface>( *it, IID_TodayPluginInterface ); - } - - - /* - * now it's autodelete so cleaned up for us - */ -} diff --git a/libopie2/examples/opiecore/oplugins/oplugins.pro b/libopie2/examples/opiecore/oplugins/oplugins.pro deleted file mode 100644 index 03f8e4d..0000000 --- a/libopie2/examples/opiecore/oplugins/oplugins.pro +++ b/dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -CONFIG += qt warn_on - -SOURCES = oplugins.cpp - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDSPATH += $(OPIEDIR)/include - -LIBS += -lopiecore2 - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opiecore/oprocessdemo/.cvsignore b/libopie2/examples/opiecore/oprocessdemo/.cvsignore deleted file mode 100644 index ab9cb4d..0000000 --- a/libopie2/examples/opiecore/oprocessdemo/.cvsignore +++ b/dev/null @@ -1,7 +0,0 @@ -oprocessdemo -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp deleted file mode 100644 index c5fc328..0000000 --- a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.cpp +++ b/dev/null @@ -1,13 +0,0 @@ -#include <opie2/oprocess.h> -#include <stdio.h> - -using namespace Opie::Core; - -int main( int argc, char** argv ) -{ - printf( "my own PID seems to be '%d'\n", OProcess::processPID( "oprocessdemo" ) ); - printf( "the PID of process 'Mickey' seems to be '%d'\n\n", OProcess::processPID( "Mickey" ) ); - - return 0; -} - diff --git a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro b/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro deleted file mode 100644 index 7efc614..0000000 --- a/libopie2/examples/opiecore/oprocessdemo/oprocessdemo.pro +++ b/dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = oprocessdemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -TARGET = oprocessdemo - -include( $(OPIEDIR)/include.pro ) - - diff --git a/libopie2/examples/opiedb/.cvsignore b/libopie2/examples/opiedb/.cvsignore deleted file mode 100644 index 972e959..0000000 --- a/libopie2/examples/opiedb/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* -obj diff --git a/libopie2/examples/opiedb/opiedb.pro b/libopie2/examples/opiedb/opiedb.pro deleted file mode 100644 index 85fa6db..0000000 --- a/libopie2/examples/opiedb/opiedb.pro +++ b/dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = sqltest - diff --git a/libopie2/examples/opiedb/sqltest/.cvsignore b/libopie2/examples/opiedb/sqltest/.cvsignore deleted file mode 100644 index 3290247..0000000 --- a/libopie2/examples/opiedb/sqltest/.cvsignore +++ b/dev/null @@ -1,7 +0,0 @@ -sqltest -Makefile* -moc* -*moc -*.o -~* -obj diff --git a/libopie2/examples/opiedb/sqltest/main.cpp b/libopie2/examples/opiedb/sqltest/main.cpp deleted file mode 100644 index f4338e9..0000000 --- a/libopie2/examples/opiedb/sqltest/main.cpp +++ b/dev/null @@ -1,62 +0,0 @@ -/* - =. This file is part of the Opie Project - .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org> - .>+-= - _;:, .> :=|. This library is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This library is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -/* OPIE */ -#include <opie2/osqlmanager.h> -#include <opie2/osqlquery.h> -#include <opie2/osqldriver.h> -#include <opie2/osqlresult.h> -#include <opie2/odebug.h> - -#include <qpe/qpeapplication.h> - -/* QT */ -#include <qdir.h> - -using namespace Opie::DB; -int main( int argc, char* argv[] ) { - -QPEApplication app( argc, argv ); -OSQLManager man; -man.registerPath( QDir::currentDirPath() ); -OSQLBackEnd::ValueList list = man.queryBackEnd(); - -OSQLDriver *driver = man.standard(); - owarn << "testmain" + driver->id() << oendl; - driver->setUrl("/home/ich/test2vhgytry"); - if ( driver->open() ) { - owarn << "could open" << oendl; - }else - owarn << "wasn't able to open" << oendl; - OSQLRawQuery raw("select * from t2" ); - OSQLResult res = driver->query( &raw ); - - OSQLRawQuery raw2( "insert into t2 VALUES(ROWID,'Meine Mutter') "); - res = driver->query(&raw2); - -}; diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp deleted file mode 100644 index c11724c..0000000 --- a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp +++ b/dev/null @@ -1,43 +0,0 @@ -#include <qdir.h> - -#include <qpe/qpeapplication.h> -#include <opie2/osqlmanager.h> -#include <opie2/osqlquery.h> -#include <opie2/osqldriver.h> -#include <opie2/osqlresult.h> - -using namespace Opie::DB; - -int main( int argc, char* argv[] ) { - - QPEApplication app( argc, argv ); - OSQLManager man; - man.registerPath( QDir::currentDirPath() ); - OSQLBackEnd::ValueList list = man.queryBackEnd(); - - OSQLDriver *driver = man.standard(); - owarn << "testmain" + driver->id() << oendl; - driver->setUrl("/home/ich/spaltenweise"); - if ( driver->open() ) { - owarn << "could open" << oendl; - }else - owarn << "wasn't able to open" << oendl; - OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(" - "uid,categories,completed," - "progress,summary,HasDate," - "DateDay,DateMonth,DateYear," - "priority,description)" ); - - OSQLResult res = driver->query( raw ); - delete raw; - for (int i = 0; i< 10000; i++ ) { - int uid = i; - OSQLRawQuery raw("insert into todolist VALUES("+ - QString::number(uid)+ ",'-122324;-12132',1,100,"+ - "'Summary234-"+QString::number(uid)+"',1,5,8,2002,1,"+ - "'Description\n12344')"); - OSQLResult res = driver->query( &raw ); - - } - return 0; -}; diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.pro b/libopie2/examples/opiedb/sqltest/spaltenweise.pro deleted file mode 100644 index 0335d16..0000000 --- a/libopie2/examples/opiedb/sqltest/spaltenweise.pro +++ b/dev/null @@ -1,13 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = spaltenweise.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopiedb2 -TARGET = spaltenweise - - - - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opiedb/sqltest/sqltest.pro b/libopie2/examples/opiedb/sqltest/sqltest.pro deleted file mode 100644 index a4eee6b..0000000 --- a/libopie2/examples/opiedb/sqltest/sqltest.pro +++ b/dev/null @@ -1,17 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = main.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopiedb2 -lsqlite3 -TARGET = sqltest - -include( $(OPIEDIR)/include.pro ) - -!isEmpty( LIBSQLITE_INC_DIR ) { - INCLUDEPATH = $$LIBSQLITE_INC_DIR $$INCLUDEPATH -} -!isEmpty( LIBSQLITE_LIB_DIR ) { - LIBS = -L$$LIBSQLITE_LIB_DIR $$LIBS -} diff --git a/libopie2/examples/opiedb/sqltest/test.osql b/libopie2/examples/opiedb/sqltest/test.osql deleted file mode 100644 index 340e4f2..0000000 --- a/libopie2/examples/opiedb/sqltest/test.osql +++ b/dev/null @@ -1,4 +0,0 @@ -Name = Test1 -Vendor = Zecke -License = ZPL -Preference = 15 diff --git a/libopie2/examples/opiedb/sqltest/test2.osql b/libopie2/examples/opiedb/sqltest/test2.osql deleted file mode 100644 index 952c99b..0000000 --- a/libopie2/examples/opiedb/sqltest/test2.osql +++ b/dev/null @@ -1,5 +0,0 @@ -Name = Test2 -Vendor = Schaf -License = SPL -Preference = 15 -Default = 0 diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp deleted file mode 100644 index 126e797..0000000 --- a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp +++ b/dev/null @@ -1,86 +0,0 @@ -#include <qdir.h> - -#include <qpe/qpeapplication.h> -#include <opie2/osqlmanager.h> -#include <opie2/osqlquery.h> -#include <opie2/osqldriver.h> -#include <opie2/osqlresult.h> - -using namespace Opie::DB; - -int main( int argc, char* argv[] ) { - -QPEApplication app( argc, argv ); -OSQLManager man; -man.registerPath( QDir::currentDirPath() ); -OSQLBackEnd::ValueList list = man.queryBackEnd(); - -OSQLDriver *driver = man.standard(); - owarn << "testmain" + driver->id() << oendl; - driver->setUrl("/home/ich/zeilenweise"); - if ( driver->open() ) { - owarn << "could open" << oendl; - }else - owarn << "wasn't able to open" << oendl; - OSQLRawQuery raw2("BEGIN TRANSACTION"); - OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(uid,key,value)"); - OSQLResult res = driver->query( &raw2 ); - res = driver->query( raw ); - delete raw; - for (int i = 0; i< 10000; i++ ) { - int uid = i; - OSQLRawQuery *raw; - raw = new OSQLRawQuery("insert into todolist VALUES("+QString::number(uid)+",'Categories',"+"'-122324;-12132')"); - OSQLResult res = driver->query(raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+QString::number(uid) + - ",'Completed',1)" ); - res = driver->query(raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'Progress',100)" ); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'Summary',"+ - "'Summary234-"+ QString::number(uid) + "')"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'HasDate',1)"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'DateDay',5)"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'DateMonth',8)"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'DateYear',2002)"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'Priority',1)"); - res = driver->query( raw ); - delete raw; - - raw = new OSQLRawQuery("insert into todolist VALUES("+ - QString::number(uid)+",'Description','" + - QString::number(uid) + "Description\n12344')"); - res = driver->query( raw ); - delete raw; - } - OSQLRawQuery raw3("COMMIT"); - res = driver->query(&raw3 ); -}; diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.pro b/libopie2/examples/opiedb/sqltest/zeilenweise.pro deleted file mode 100644 index 1fa17cd..0000000 --- a/libopie2/examples/opiedb/sqltest/zeilenweise.pro +++ b/dev/null @@ -1,13 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = zeilenweise.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopiedb2 -TARGET = zeilenweise - - - - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opiemm/.cvsignore b/libopie2/examples/opiemm/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opiemm/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiemm/opiemm.pro b/libopie2/examples/opiemm/opiemm.pro deleted file mode 100644 index 0522ebe..0000000 --- a/libopie2/examples/opiemm/opiemm.pro +++ b/dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = osoundsystemdemo - diff --git a/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore b/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore deleted file mode 100644 index 0c98558..0000000 --- a/libopie2/examples/opiemm/osoundsystemdemo/.cvsignore +++ b/dev/null @@ -1,7 +0,0 @@ -osoundsystemdemo -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp deleted file mode 100644 index f74a1b9..0000000 --- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.cpp +++ b/dev/null @@ -1,66 +0,0 @@ -/* - =. This file is part of the Opie Project - .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org> - .>+-= - _;:, .> :=|. This library is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This library is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -/* OPIE */ -#include <opie2/osoundsystem.h> -#include <opie2/odebug.h> - -using namespace Opie::MM; - -int main( int argc, char** argv ) -{ - odebug << "OPIE Sound System Demo" << oendl; - - OSoundSystem* sound = OSoundSystem::instance(); - - OSoundSystem::CardIterator it = sound->iterator(); -/* - while ( it.current() ) - { - odebug << "DEMO: OSoundSystem contains Interface '" << it.current()->name() << "'" << oendl; - ++it; - } - -*/ - OSoundCard* card = it.current(); - - OMixerInterface* mixer = card->mixer(); - - QStringList channels = mixer->allChannels(); - - for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) - { - bool stereo = mixer->isStereo( *it ); - odebug << "OSSDEMO: Mixer has channel " << *it << ( stereo ? "[stereo]" : "[mono]" ) << oendl; - odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff ) - << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl; - } - - return 0; - -} diff --git a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro b/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro deleted file mode 100644 index 95924be..0000000 --- a/libopie2/examples/opiemm/osoundsystemdemo/osoundsystemdemo.pro +++ b/dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = osoundsystemdemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -lopiemm2 -TARGET = osoundsystemdemo -MOC_DIR = moc -OBJECTS_DIR = obj - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opienet/.cvsignore b/libopie2/examples/opienet/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opienet/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opienet/miniwellenreiter/.cvsignore b/libopie2/examples/opienet/miniwellenreiter/.cvsignore deleted file mode 100644 index e0e629a..0000000 --- a/libopie2/examples/opienet/miniwellenreiter/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -miniwellenreiter -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp deleted file mode 100644 index ebd3b5f..0000000 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/dev/null @@ -1,234 +0,0 @@ -#include <qdict.h> -#include <qsocketnotifier.h> -#include <qstring.h> -#include <opie2/onetwork.h> -#include <qapplication.h> -#include <opie2/opcap.h> -#include <cerrno> -#include <cstdio> -#include <cstdlib> -#include <cstring> - - -using namespace Opie::Net; -//======================== Station help class =============================== - -class Station -{ - public: - Station( QString t, int c, bool w ) : type(t), channel(c), wep(w), beacons(1) {}; - ~Station() {}; - - QString type; - int channel; - bool wep; - int beacons; -}; - -QDict<Station> stations; - -//======================== Application class =============================== - -class Wellenreiter : public QApplication -{ -Q_OBJECT -public: - Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ), channel( 1 ) - { - - ONetwork* net = ONetwork::instance(); - - if ( argc < 3 ) - { - printf( "Usage: ./%s <interface> <driver> <interval>\n", argv[0] ); - printf( "\n" ); - printf( "Valid wireless interfaces (detected) are:\n" ); - - ONetwork::InterfaceIterator it = net->iterator(); - while ( it.current() ) - { - if ( it.current()->isWireless() ) - { - printf( " - '%s' (MAC=%s) (IPv4=%s)\n", (const char*) it.current()->name(), - (const char*) it.current()->macAddress().toString(), - (const char*) it.current()->ipV4Address() ); - } - ++it; - } - exit( -1 ); - } - - printf( "*******************************************************************\n" ); - printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" ); - printf( "*******************************************************************\n" ); - printf( "\n\n" ); - - QString interface( argv[1] ); - QString driver( argv[2] ); - - printf( "Trying to use '%s' as %s-controlled device...\n", (const char*) interface, (const char*) driver ); - - // sanity checks before downcasting - ONetworkInterface* iface = net->interface( interface ); - if ( !iface ) - { - printf( "Interface '%s' doesn't exist. Exiting.\n", (const char*) interface ); - exit( -1 ); - } - if ( !iface->isWireless() ) - { - printf( "Interface '%s' doesn't support wireless extensions. Exiting.\n", (const char*) interface ); - exit( -1 ); - } - - // downcast should be safe now - wiface = (OWirelessNetworkInterface*) iface; - printf( "Using wireless interface '%s' for scanning (current SSID is '%s')...\n", (const char*) interface, (const char*) wiface->SSID() ); - - // ifconfig +promisc the interface to receive all packets - if ( !wiface->promiscuousMode() ) - { - printf( "Interface status is not promisc... switching to promisc... " ); - wiface->setPromiscuousMode( true ); - if ( !wiface->promiscuousMode() ) - { - printf( "failed (%s). Exiting.\n", strerror( errno ) ); - exit( -1 ); - } - else - { - printf( "ok.\n" ); - } - } - else - printf( "Interface status is already promisc - good.\n" ); - - // connect a monitoring strategy to the interface - if ( driver == "orinoco" ) - new OOrinocoMonitoringInterface( wiface, false ); - else - if ( driver == "hostap" ) - new OHostAPMonitoringInterface( wiface, false ); - else - if ( driver == "wlan-ng" ) - new OWlanNGMonitoringInterface( wiface, false ); - else - { - printf( "Unknown driver. Exiting\n" ); - exit( -1 ); - } - - // enable monitoring mode - printf( "Enabling monitor mode...\n" ); - wiface->setMode( "monitor" ); - - // open a packet capturer - cap = new OPacketCapturer(); - cap->open( interface ); - if ( !cap->isOpen() ) - { - printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) ); - exit( -1 ); - } - - // set capturer to non-blocking mode - cap->setBlocking( false ); - - // start channel hopper - //wiface->setChannelHopping( 1000 ); - - // connect - connect( cap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); - // timer - startTimer( 1000 ); - - } - - ~Wellenreiter() {}; - -public slots: - virtual void timerEvent(QTimerEvent* e) - { - wiface->setChannel( channel++ ); - if ( channel == 14 ) channel = 1; - } - - void receivePacket(OPacket* p) - { - if (!p) - { - printf( "(empty packet received)\n" ); - return; - } - - OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" ); - if ( beacon ) - { - OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); - QString essid = ssid ? ssid->ID() : QString::fromLatin1( "<unknown>" ); - - if ( stations.find( essid ) ) - stations[essid]->beacons++; - else - { - printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) essid ); - stations.insert( essid, new Station( "unknown", wiface->channel(), - ((OWaveLanPacket*) beacon->parent())->usesWep() ) ); - } - return; - } - - OWaveLanDataPacket* data = (OWaveLanDataPacket*) p->child( "802.11 Data" ); - if ( data ) - { - OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); - if ( wlan->fromDS() && !wlan->toDS() ) - { - printf( "FromDS: '%s' -> '%s' via '%s'\n", - (const char*) wlan->macAddress3().toString(true), - (const char*) wlan->macAddress1().toString(true), - (const char*) wlan->macAddress2().toString(true) ); - } - else - if ( !wlan->fromDS() && wlan->toDS() ) - { - printf( "ToDS: '%s' -> '%s' via '%s'\n", - (const char*) wlan->macAddress2().toString(true), - (const char*) wlan->macAddress3().toString(true), - (const char*) wlan->macAddress1().toString(true) ); - } - else - if ( wlan->fromDS() && wlan->toDS() ) - { - printf( "WSD(bridge): '%s' -> '%s' via '%s' and '%s'\n", - (const char*) wlan->macAddress4().toString(true), - (const char*) wlan->macAddress3().toString(true), - (const char*) wlan->macAddress1().toString(true), - (const char*) wlan->macAddress2().toString(true) ); - } - else - { - printf( "IBSS(AdHoc): '%s' -> '%s' (Cell: '%s')'\n", - (const char*) wlan->macAddress2().toString(true), - (const char*) wlan->macAddress1().toString(true), - (const char*) wlan->macAddress3().toString(true) ); - } - return; - } - } -private: - OPacketCapturer* cap; - OWirelessNetworkInterface* wiface; - int channel; -}; - - -int main( int argc, char** argv ) -{ - Wellenreiter w( argc, argv ); - w.exec(); - return 0; -} - -#include "miniwellenreiter.moc" - diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro deleted file mode 100644 index d7c1fc2..0000000 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro +++ b/dev/null @@ -1,19 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = miniwellenreiter.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -lopienet2 -TARGET = miniwellenreiter -MOC_DIR = moc -OBJECTS_DIR = obj - -include( $(OPIEDIR)/include.pro ) - -!isEmpty( LIBPCAP_INC_DIR ) { - INCLUDEPATH = $$LIBPCAP_INC_DIR $$INCLUDEPATH -} -!isEmpty( LIBPCAP_LIB_DIR ) { - LIBS = -L$$LIBPCAP_LIB_DIR $$LIBS -} diff --git a/libopie2/examples/opienet/onetworkdemo/.cvsignore b/libopie2/examples/opienet/onetworkdemo/.cvsignore deleted file mode 100644 index c2638e5..0000000 --- a/libopie2/examples/opienet/onetworkdemo/.cvsignore +++ b/dev/null @@ -1,8 +0,0 @@ -onetworkdemo -Makefile* -obj -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp deleted file mode 100644 index e0c93a2..0000000 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/dev/null @@ -1,176 +0,0 @@ -/* - =. This file is part of the Opie Project - .=l. Copyright (C) 2004 Opie Team <opie-devel@handhelds.org> - .>+-= - _;:, .> :=|. This library is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This library is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -/* OPIE */ -#include <opie2/onetwork.h> -#include <opie2/ostation.h> -#include <opie2/omanufacturerdb.h> -#include <opie2/odebug.h> - -/* STD */ -#include <unistd.h> - -using namespace Opie::Net; - -int main( int argc, char** argv ) -{ - odebug << "OPIE Network Demo" << oendl; - - ONetwork* net = ONetwork::instance(); - - ONetwork::InterfaceIterator it = net->iterator(); - - while ( it.current() ) - { - odebug << "DEMO: ONetwork contains Interface '" << it.current()->name() << "'" << oendl; - odebug << "DEMO: Datalink code is '" << it.current()->dataLinkType() << "'" << oendl; - odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString() << "'" << oendl; - odebug << "DEMO: MAC Address is '" << it.current()->macAddress().toString(true) << "'" << oendl; - odebug << "DEMO: MAC Manufacturer seems to be '" << it.current()->macAddress().manufacturer() << "'" << oendl; - odebug << "DEMO: Manufacturertest1 = '" << OManufacturerDB::instance()->lookupExt( "08:00:87" ) << "'" << oendl; - odebug << "DEMO: Manufacturertest2 = '" << OManufacturerDB::instance()->lookupExt( "E2:0C:0F" ) << "'" << oendl; - odebug << "Demo: IPv4 Address is '" << it.current()->ipV4Address() << "'" << oendl; - if ( it.current()->isWireless() ) - { - OWirelessNetworkInterface* iface = static_cast<OWirelessNetworkInterface*>( it.current() ); - odebug << "DEMO: '" << iface->name() << "' seems to feature the wireless extensions." << oendl; - odebug << "DEMO: Current SSID is '" << iface->SSID() << "'" << oendl; - odebug << "DEMO: Antenna is tuned to '" << iface->frequency() << "', that is channel " << iface->channel() << "" << oendl; - - //if ( iface->mode() == OWirelessNetworkInterface::adhoc ) - //{ - //odebug << "DEMO: Associated AP has MAC Address '" << iface->associatedAP().toString() << "'" << oendl; - //} - - /* - - // nickname - odebug << "DEMO: Current NickName is '" << iface->nickName() << "'" << oendl; - iface->setNickName( "MyNickName" ); - if ( iface->nickName() != "MyNickName" ) - odebug << "DEMO: Warning! Can't change nickname" << oendl; - else - odebug << "DEMO: Nickname change successful." << oendl; - - /* - - // operation mode - odebug << "DEMO: Current OperationMode is '" << iface->mode() << "'" << oendl; - iface->setMode( "adhoc" ); - if ( iface->mode() != "adhoc" ) - odebug << "DEMO: Warning! Can't change operation mode" << oendl; - else - odebug << "DEMO: Operation Mode change successful." << oendl; - - // RF channel - odebug << "DEMO: Current Channel is '" << iface->channel() << "'" << oendl; - iface->setChannel( 1 ); - if ( iface->channel() != 1 ) - odebug << "DEMO: Warning! Can't change RF channel" << oendl; - else - odebug << "DEMO: RF channel change successful." << oendl; - - iface->setMode( "managed" ); - - */ - - /* - - // network scan - - OStationList* stations = iface->scanNetwork(); - if ( stations ) - { - odebug << "DEMO: # of stations around = " << stations->count() << "" << oendl; - OStation* station; - for ( station = stations->first(); station != 0; station = stations->next() ) - { - odebug << "DEMO: station dump following..." << oendl; - station->dump(); - } - } - - else - { - odebug << "DEMO: Warning! Scan didn't work!" << oendl; - } - - /* - - // first some wrong calls to check if this is working - iface->setPrivate( "seppel", 10 ); - iface->setPrivate( "monitor", 0 ); - - // now the real deal - iface->setPrivate( "monitor", 2, 2, 3 ); - - // trying to set hw address to 12:34:56:AB:CD:EF - - /* - - OMacAddress addr = OMacAddress::fromString( "12:34:56:AB:CD:EF" ); - iface->setUp( false ); - iface->setMacAddress( addr ); - iface->setUp( true ); - odebug << "DEMO: MAC Address now is '" << iface->macAddress().toString() << "'" << oendl; - - */ - - // monitor test - - - - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; - iface->setMode( "monitor" ); - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; - - sleep( 1 ); - - iface->setChannel( 1 ); - iface->setMode( "managed" ); - - //sleep( 1 ); - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; - - /*iface->setMode( "adhoc" ); - sleep( 1 ); - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; - iface->setMode( "managed" ); - sleep( 1 ); - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; - iface->setMode( "master" ); - sleep( 1 ); - odebug << "DEMO: current interface mode is '" << iface->mode() << "'" << oendl; */ - - } - ++it; - } - - return 0; - -} diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro deleted file mode 100644 index cf293b5..0000000 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.pro +++ b/dev/null @@ -1,12 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = -SOURCES = onetworkdemo.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopiecore2 -lopienet2 -TARGET = onetworkdemo -MOC_DIR = moc -OBJECTS_DIR = obj - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opienet/opienet.pro b/libopie2/examples/opienet/opienet.pro deleted file mode 100644 index c7800a9..0000000 --- a/libopie2/examples/opienet/opienet.pro +++ b/dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = miniwellenreiter onetworkdemo - diff --git a/libopie2/examples/opieui/.cvsignore b/libopie2/examples/opieui/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opieui/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro b/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro deleted file mode 100644 index 5f379ef..0000000 --- a/libopie2/examples/opieui/okeyconfigwidget/keyconfig.pro +++ b/dev/null @@ -1,12 +0,0 @@ -CONFIG += qt - -TEMPLATE = app -SOURCES = testwidget.cpp -HEADERS = testwidget.h - -INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/noncore/graphics/opie-eye/lib/ -DESTPATH += $(OPIEDIR)/include - -LIBS += -lopieui2 -lopiecore2 - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp b/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp deleted file mode 100644 index 6d2c773..0000000 --- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.cpp +++ b/dev/null @@ -1,128 +0,0 @@ -#include "testwidget.h" - -#include <opie2/okeyconfigwidget.h> - -#include <opie2/oapplicationfactory.h> -#include <opie2/otabwidget.h> - -#include <qpe/qpeapplication.h> - -#include <qevent.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qmainwindow.h> -#include <qdialog.h> - - -/** - * QObject with signals and slots inside a .cpp - * requires the .moc at the bottom! and a run of qmake - */ -class MainWindow : public QMainWindow { - Q_OBJECT -public: - static QString appName() { - return QString::fromLatin1("keyconfig"); - } - MainWindow( QWidget*, const char*, WFlags fl ); - ~MainWindow() {} -private slots: - void slotClicked(); -private: - Opie::Core::OKeyConfigManager *m_manager; -}; - - -OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<MainWindow> ) - - -MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl ) - : QMainWindow( parent, name, fl ) -{ - QVBoxLayout *lay = new QVBoxLayout( this ); - QPushButton *btn = new QPushButton( tr("Configure" ), this ); - TestMainWindow *wid = new TestMainWindow( this, "name", 0 ); - - lay->addWidget( btn ); - lay->addWidget( wid ); - m_manager = wid->manager(); - - connect( btn, SIGNAL(clicked()), this, SLOT(slotClicked()) ); -} - -void MainWindow::slotClicked() { - QDialog diag( this, "name", true ); - diag.setCaption( tr( "Manage Keys" ) ); - - QHBoxLayout *lay = new QHBoxLayout( &diag ); - Opie::Ui::OKeyConfigWidget *wid = new Opie::Ui::OKeyConfigWidget( &diag, "key config" ); - wid->setChangeMode( Opie::Ui::OKeyConfigWidget::Queue ); - wid->insert( tr("MainWindow Options" ), m_manager ); - wid->load(); - - lay->addWidget( wid ); - - if ( QPEApplication::execDialog( &diag ) == QDialog::Accepted ) { - wid->save(); - } -} - -TestMainWindow::TestMainWindow( QWidget* parent, const char* slot, WFlags fl ) - : Opie::Ui::OListView( parent, slot, fl) -{ - addColumn( tr( "A Doo" ) ); - addColumn( tr( "B Doo" ) ); - - m_config = new Opie::Core::OConfig( "test_config_foo" ); - - /* generate the black list */ - Opie::Core::OKeyPair::List blackList; - blackList.append( Opie::Core::OKeyPair::leftArrowKey() ); - blackList.append( Opie::Core::OKeyPair::rightArrowKey() ); - blackList.append( Opie::Core::OKeyPair::downArrowKey() ); - blackList.append( Opie::Core::OKeyPair::upArrowKey() ); - - m_manager = new Opie::Core::OKeyConfigManager( m_config, "Key Group", - blackList, false, this, "Key Manager" ); - - m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Delete Action" ), "delete_key", QPixmap(), - 10, Opie::Core::OKeyPair( Qt::Key_D, Qt::ShiftButton ), this, - SLOT(slotDelete(QWidget*,QKeyEvent*)) ) ); - m_manager->addKeyConfig( Opie::Core::OKeyConfigItem( tr( "Show Action" ), "show_key", QPixmap(), - 11, Opie::Core::OKeyPair( Qt::Key_S, Qt::AltButton ) ) ); - - connect(m_manager, SIGNAL(actionActivated(QWidget*,QKeyEvent*,const Opie::Core::OKeyConfigItem&)), - this, SLOT(slotAction(QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem&)) ); -// when commenting the line below out the keyPressEvent will work - m_manager->handleWidget( this ); - m_manager->load(); -} - -TestMainWindow::~TestMainWindow() { - m_manager->save(); - delete m_config; -} - -Opie::Core::OKeyConfigManager* TestMainWindow::manager() { - return m_manager; -} - -/* - * This only works if we do not handle the even with m_manager->handleWidget( this ) - * So this is only for demo purposes - */ -void TestMainWindow::keyPressEvent( QKeyEvent* ev ) { - owarn << "String is "+ m_manager->handleKeyEvent( ev ).text() << oendl; - owarn << "Id was " << m_manager->handleKeyEventId( ev ) << " " << ev->key() << " " << ev->state() << " " << ev->ascii() << "" << oendl; - ev->ignore(); -} - -void TestMainWindow::slotDelete( QWidget* wid, QKeyEvent* ev ) { - owarn << "Slot Delete " << wid << " " << ev->key() << " " << ev->state() << "" << oendl; -} - -void TestMainWindow::slotAction( QWidget* wid, QKeyEvent* ev, const Opie::Core::OKeyConfigItem& item) { - owarn << "Slot Action " << wid << " " << ev->key() << " " << ev->state() << " " << item.text() << " " << item.id() << "" << oendl; -} - -#include "testwidget.moc" diff --git a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h b/libopie2/examples/opieui/okeyconfigwidget/testwidget.h deleted file mode 100644 index 6ecb346..0000000 --- a/libopie2/examples/opieui/okeyconfigwidget/testwidget.h +++ b/dev/null @@ -1,40 +0,0 @@ -#ifndef TEST_WIDGET_H -#define TEST_WIDGET_H - -#include <qmainwindow.h> - -#include <opie2/olistview.h> - -namespace Opie{ -namespace Ui{ - class OTabWidget; - class OListView; -} -namespace Core { - class OConfig; - class OKeyConfigManager; - class OKeyConfigItem; -} -} -class QKeyEvent; - - -class TestMainWindow : public Opie::Ui::OListView { - Q_OBJECT -public: - - TestMainWindow(QWidget* parent, const char*, WFlags fl ); - ~TestMainWindow(); - - Opie::Core::OKeyConfigManager *manager(); -protected: - void keyPressEvent( QKeyEvent* ); -private slots: - void slotDelete( QWidget*, QKeyEvent* ); - void slotAction( QWidget*, QKeyEvent*, const Opie::Core::OKeyConfigItem& ); -private: - Opie::Core::OConfig *m_config; - Opie::Core::OKeyConfigManager *m_manager; -}; - -#endif diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp deleted file mode 100644 index cd49c28..0000000 --- a/libopie2/examples/opieui/olistviewdemo/main.cpp +++ b/dev/null @@ -1,29 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -**********************************************************************/ - -#include "olistviewdemo.h" -#include <opie2/oapplication.h> - -using namespace Opie::Ui; -using namespace Opie::Core; - -int main( int argc, char **argv ) -{ - OApplication a( argc, argv, "OListViewDemo" ); - OListViewDemo e; - a.showMainWidget(&e); - return a.exec(); -} - diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp deleted file mode 100644 index 4c05620..0000000 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp +++ b/dev/null @@ -1,86 +0,0 @@ -/* - This file is part of the Opie Project - - Copyright (C) 2003 Michael 'Mickey' Lauer - <mickey@tm.informatik.uni-frankfurt.de> - =. - .=l. - .>+-= - _;:, .> :=|. This program is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -#include "olistviewdemo.h" - -/* OPIE */ -#include <opie2/olistview.h> -#include <opie2/odebug.h> - -/* QT */ -#include <qstring.h> -#include <qpixmap.h> -#include <qlistview.h> - -using namespace Opie::Ui; - -OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) - :QVBox( parent, name, f ) -{ - lv = new ONamedListView( this ); - lv->setRootIsDecorated( true ); - lv->addColumns( QStringList::split( ' ', "Column1 Column2 Column3 Column4" ) ); - - ONamedListViewItem* item = new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); - item->setText( "Column2", "ModifiedText" ); - item->setText( "Column5", "ThisColumnDoesNotExits" ); - - new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); - new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); - new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Minni" ) ); - item = new ONamedListViewItem( lv, QStringList::split( ' ', "XXX YYY ZZZ ***" ) ); - new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); - new ONamedListViewItem( lv, QStringList::split( ' ', "Text1 Text2 Text3 Text4" ) ); - - new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); - new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); - new ONamedListViewItem( item, QStringList::split( ' ', "SubText1 Text2 Text3 Text4" ) ); - item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComes" ) ); - item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 HereItComesSoon" ) ); - item = new ONamedListViewItem( item, QStringList::split( ' ', "Text1 Text2 Text3 Mickey" ) ); - - if ( lv->find( 3, "Mickey", 3 ) ) - odebug << "found Mickey :-)" << oendl; - else - odebug << "did not found Mickey :-(" << oendl; - - if ( lv->find( 3, "Minni", 0 ) ) - odebug << "found Minni :-)" << oendl; - else - odebug << "did not found Minni :-(" << oendl; - -} - -OListViewDemo::~OListViewDemo() -{ -} - diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h deleted file mode 100644 index 0b5c498..0000000 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h +++ b/dev/null @@ -1,51 +0,0 @@ -/* - This file is part of the Opie Project - - Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> - =. - .=l. - .>+-= - _;:, .> :=|. This program is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -#ifndef OLISTVIEWDEMO_H -#define OLISTVIEWDEMO_H - -#include <qvbox.h> -#include <opie2/olistview.h> - -class OListViewDemo: public QVBox -{ - Q_OBJECT - - public: - OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); - virtual ~OListViewDemo(); - - private: - Opie::Ui::ONamedListView* lv; - -}; - -#endif diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro deleted file mode 100644 index 52c3ceb..0000000 --- a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro +++ b/dev/null @@ -1,23 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = olistviewdemo.h -SOURCES = olistviewdemo.cpp \ - main.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopieui2 -lopiecore2 -lqpe -TARGET = olistviewdemo -MOC_DIR = moc -OBJECTS_DIR = obj - - - - -!contains( platform, x11 ) { - include( $(OPIEDIR)/include.pro ) -} - -contains( platform, x11 ) { - LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib -} - diff --git a/libopie2/examples/opieui/opieui.pro b/libopie2/examples/opieui/opieui.pro deleted file mode 100644 index 853ac50..0000000 --- a/libopie2/examples/opieui/opieui.pro +++ b/dev/null @@ -1,5 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS = olistviewdemo owidgetstack_example osplitter_example - - - diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp deleted file mode 100644 index 07c7e51..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.cpp +++ b/dev/null @@ -1,34 +0,0 @@ -#include "osplitter_example.h" - -/* OPIE */ - -#include <opie2/osplitter.h> -#include <opie2/ofileselector.h> -#include <qpe/qpeapplication.h> -#include <opie2/oapplicationfactory.h> - -/* QT*/ -#include <qdir.h> -#include <qlayout.h> - -using namespace Opie::Ui; -using namespace Opie::Core; - -OPIE_EXPORT_APP( OApplicationFactory<OSplitterExample> ) - -OSplitterExample::OSplitterExample( QWidget *w,const char* n,WFlags f ) - : QWidget( w, n, f ){ - QVBoxLayout * lay = new QVBoxLayout(this); - OSplitter * splitter = new OSplitter( Horizontal, this ); - lay->addWidget( splitter ); - - OFileSelector *selector = new OFileSelector( splitter, OFileSelector::FileSelector, - OFileSelector::Normal, QDir::homeDirPath(), - QString::null ); - splitter->addWidget( selector, "zoom", tr("Selector 1") ); - - selector = new OFileSelector( splitter, OFileSelector::FileSelector, OFileSelector::Normal, - QDir::homeDirPath(), QString::null ); - splitter->addWidget( selector, "zoom", tr("Selector 2") ); - -} diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.h b/libopie2/examples/opieui/osplitter_example/osplitter_example.h deleted file mode 100644 index 0cf28aa..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.h +++ b/dev/null @@ -1,19 +0,0 @@ -/* - * May be used, copied and modified wihtout any limitation - */ - -#ifndef OSPlitter_EXAMPLE_H -#define OSPlitter_EXAMPLE_H - -#include <qvbox.h> - -class OSplitterExample : public QWidget { - Q_OBJECT -public: - static QString appName() { return QString::fromLatin1("osplitter_example"); } - OSplitterExample( QWidget *parent, const char* name, WFlags fl ); - -}; - - -#endif diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_example.pro b/libopie2/examples/opieui/osplitter_example/osplitter_example.pro deleted file mode 100644 index 9f156a1..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_example.pro +++ b/dev/null @@ -1,13 +0,0 @@ -CONFIG = qt warn_on -TEMPLATE = app -TARGET = osplitter_example - -HEADERS = osplitter_example.h -SOURCES = osplitter_example.cpp - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDSPATH += $(OPIEDIR)/include - -LIBS += -lqpe -lopieui2 - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp deleted file mode 100644 index d747bd9..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp +++ b/dev/null @@ -1,81 +0,0 @@ - -#include <qstring.h> -#include <qlabel.h> -#include <qheader.h> -#include <qlayout.h> - -#include <qpe/qpeapplication.h> - -#include <opie2/oapplicationfactory.h> -#include "osplitter_mail.h" - -using namespace Opie::Ui; - -OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) - -class Folder { - int dummy; -}; - -// ----------------------------------------------------------------- - -ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) - : QWidget( p, name, fl ) { - qApp->installEventFilter( this ); - m_lstFolders.setAutoDelete( true ); - QHBoxLayout *lay = new QHBoxLayout(this); - - m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); - lay->addWidget( m_splitter ); - connect(m_splitter, SIGNAL(sizeChanged(bool,Orientation) ), - this, SLOT(slotSizeChange(bool,Orientation) ) ); - - m_overview = new QListView( m_splitter ); - m_overview->header()->setClickEnabled( FALSE ); - m_overview->addColumn( tr("Folder") ); -// m_overview->setMaximumWidth( 200 ); - m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); - m_splitter->setSizeChange( 300 ); - - /* OSplitter starts with the small mode */ - m_messages = 0; - m_message = m_attach = 0; - - splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); - splitti->setSizeChange( 300 ); - splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); - - QLabel *lbl = new QLabel(splitti); - lbl->setTextFormat ( Qt::RichText ); - lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); - - m_messages = new QListView( splitti ); - m_messages->addColumn(" Messages "); - - folder1 = new QListView( splitti ); - folder1->addColumn( "Messages 2 " ); - - splitti->addWidget(m_messages, "mail", tr("Mails") ); - splitti->addWidget(folder1, "folder", tr("Folder") ); - splitti->addWidget( lbl, "logo", tr("Label") ); - m_message = lbl; - - m_splitter->addWidget( splitti ); - -} - - -ListViews::~ListViews() { - -} - - -bool ListViews::eventFilter( QObject* obj, QEvent* ev ) { - if (!obj->isWidgetType() ) - return false; - if ( ev->type() == QEvent::MouseButtonRelease ) { - owarn << " name " << obj->name() << ", class " << obj->className() << "" << oendl; - } - - return false; -} diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h deleted file mode 100644 index 67961fb..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h +++ b/dev/null @@ -1,51 +0,0 @@ -/* - * You may use, modify and distribute this code without any limitation - */ - -/* - * Header file for a more complete email client like - * layout - */ - -#ifndef OPIE_SPLITTER_MAIL_EXAMPLE_H -#define OPIE_SPLITTER_MAIL_EXAMPLE_H - -#include <qwidget.h> -#include <qlist.h> -#include <qlistview.h> - -#include <opie2/osplitter.h> - - -class Folder; -class QLabel; - -class ListViews : public QWidget { - Q_OBJECT -public: - static QString appName() { return QString::fromLatin1("osplitter-mail"); } - ListViews( QWidget* parent, const char * name, WFlags fl ); - ~ListViews(); - - bool eventFilter( QObject* , QEvent* ); -private: - void initFolders(); - void initFolder( Folder *folder, unsigned int &count ); - - QListView *m_messages, *m_overview; - QLabel *m_message, *m_attach; - QList<QListView> m_folders; // used in tab mode - QList<Folder> m_lstFolders; - bool m_mode : 1; // bitfield - Opie::Ui::OSplitter *m_splitter; - Opie::Ui::OSplitter *splitti; - QListView *folder1; -#if 0 -//private slots: -// void slotFolderChanged( QListViewItem* ); -// void slotMessageChanged(); -// void slotSizeChange( bool, const QSize& ); -#endif -}; - -#endif diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro b/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro deleted file mode 100644 index f9c43ef..0000000 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro +++ b/dev/null @@ -1,12 +0,0 @@ -CONFIG += qt warn_on -TEMPLATE = app -TARGET = osplitter-mail - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDSPATH += $(OPIEDIR)/include - -HEADERS = osplitter_mail.h -SOURCES = osplitter_mail.cpp - -LIBS += -lqpe -lopieui2 -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/examples/opieui/oversatileviewdemo/.cvsignore b/libopie2/examples/opieui/oversatileviewdemo/.cvsignore deleted file mode 100644 index 8f7300c..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/.cvsignore +++ b/dev/null @@ -1,6 +0,0 @@ -Makefile* -moc* -*moc -*.o -~* - diff --git a/libopie2/examples/opieui/oversatileviewdemo/1.png b/libopie2/examples/opieui/oversatileviewdemo/1.png Binary files differdeleted file mode 100644 index 0e2e41b..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/1.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/1small.png b/libopie2/examples/opieui/oversatileviewdemo/1small.png Binary files differdeleted file mode 100644 index ce6b262..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/1small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/2.png b/libopie2/examples/opieui/oversatileviewdemo/2.png Binary files differdeleted file mode 100644 index 8a0181d..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/2.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/2small.png b/libopie2/examples/opieui/oversatileviewdemo/2small.png Binary files differdeleted file mode 100644 index 82a4431..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/2small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/3.png b/libopie2/examples/opieui/oversatileviewdemo/3.png Binary files differdeleted file mode 100644 index 8a58d6c..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/3.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/3small.png b/libopie2/examples/opieui/oversatileviewdemo/3small.png Binary files differdeleted file mode 100644 index 073ba55..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/3small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/4.png b/libopie2/examples/opieui/oversatileviewdemo/4.png Binary files differdeleted file mode 100644 index 198891b..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/4.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/4small.png b/libopie2/examples/opieui/oversatileviewdemo/4small.png Binary files differdeleted file mode 100644 index 7f1cc01..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/4small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/5.png b/libopie2/examples/opieui/oversatileviewdemo/5.png Binary files differdeleted file mode 100644 index ee7344a..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/5.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/5small.png b/libopie2/examples/opieui/oversatileviewdemo/5small.png Binary files differdeleted file mode 100644 index 105b038..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/5small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/6.png b/libopie2/examples/opieui/oversatileviewdemo/6.png Binary files differdeleted file mode 100644 index 72c3692..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/6.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/6small.png b/libopie2/examples/opieui/oversatileviewdemo/6small.png Binary files differdeleted file mode 100644 index 1db2a30..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/6small.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png Binary files differdeleted file mode 100644 index 4157333..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png Binary files differdeleted file mode 100644 index acc992c..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png Binary files differdeleted file mode 100644 index 5e7e37e..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png Binary files differdeleted file mode 100644 index acd3265..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf.png b/libopie2/examples/opieui/oversatileviewdemo/leaf.png Binary files differdeleted file mode 100644 index c8435ec..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/leaf.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf32.png b/libopie2/examples/opieui/oversatileviewdemo/leaf32.png Binary files differdeleted file mode 100644 index 5e90ead..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/leaf32.png +++ b/dev/null diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp deleted file mode 100644 index e48395a..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/main.cpp +++ b/dev/null @@ -1,32 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -**********************************************************************/ - -#include "opieuidemo.h" - -#include <opie2/oapplication.h> - -using namespace Opie::Core; -using namespace Opie::Ui; - -int main( int argc, char **argv ) -{ - OApplication a( argc, argv, "Opie UI Demo" ); - odebug << "." << oendl; - OpieUIDemo e; - odebug << "." << oendl; - a.showMainWidget(&e); - odebug << "." << oendl; - return a.exec(); -} diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp deleted file mode 100644 index a2cdd5a..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp +++ b/dev/null @@ -1,203 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -***********************************************************************/ - -// Qt - -#include <qcolor.h> -#include <qpopupmenu.h> -#include <qmenubar.h> -#include <qmessagebox.h> -#include <qvbox.h> -#include <qstring.h> -#include <qstringlist.h> - -// Qtopia - -#include <qpe/qpeapplication.h> -#include <qpe/global.h> - -// Opie - -#include <opie2/odevice.h> - -#include <opie2/ocompletionbox.h> -#include <opie2/olineedit.h> -#include <opie2/ocombobox.h> -#include <opie2/oeditlistbox.h> -#include <opie2/oselector.h> -#include <opie2/opopupmenu.h> - -#include <qtabwidget.h> -#include "oversatileviewdemo.h" - -// Local - -#include "opieuidemo.h" - -using namespace Opie::Core; -using namespace Opie::Ui; - -enum Demos { ocompletionbox, olineedit, ocombobox, oeditlistbox, oselector }; - -OpieUIDemo::OpieUIDemo( QWidget* parent, const char* name, WFlags fl ) - : QMainWindow( parent, name, fl ) -{ - - QMenuBar* mbar = this->menuBar(); - OPopupMenu* demo = new OPopupMenu( this ); - demo->setTitle( "Title" ); - demo->setItemParameter( demo->insertItem( "OCompletionBox", this, SLOT( demo(int) ) ), ocompletionbox ); - demo->setItemParameter( demo->insertItem( "OLineEdit", this, SLOT( demo(int) ) ), olineedit ); - demo->setItemParameter( demo->insertItem( "OComboBox", this, SLOT( demo(int) ) ), ocombobox ); - demo->setItemParameter( demo->insertItem( "OEditListBox", this, SLOT( demo(int) ) ), oeditlistbox ); - demo->setItemParameter( demo->insertItem( "OSelector", this, SLOT( demo(int) ) ), oselector ); - mbar->insertItem( "Demonstrate", demo ); - - build(); - -} - -OpieUIDemo::~OpieUIDemo() -{ -} - -void OpieUIDemo::build() -{ - main = new QTabWidget( this, "tabwidget" ); - setCentralWidget( main ); - main->show(); - - main->addTab( new OVersatileViewDemo( main ), "VersatileView" ); -} - - -void OpieUIDemo::demo( int d ) -{ - switch (d) - { - case ocompletionbox: demoOCompletionBox(); break; - case olineedit: demoOLineEdit(); break; - case ocombobox: demoOComboBox(); break; - case oeditlistbox: demoOEditListBox(); break; - case oselector: demoOSelector(); break; - - } - -} - -void OpieUIDemo::demoOCompletionBox() -{ - odebug << "ocompletionbox" << oendl; - - OCompletionBox* box = new OCompletionBox( 0 ); - box->insertItem( "This CompletionBox" ); - box->insertItem( "Says 'Hello World'" ); - box->insertItem( "Here are some" ); - box->insertItem( "Additional Items" ); - box->insertItem( "Complete Completion Box" ); - - connect( box, SIGNAL( activated(const QString&) ), this, SLOT( messageBox(const QString&) ) ); - box->popup(); - -} - -void OpieUIDemo::demoOLineEdit() -{ - odebug << "olineedit" << oendl; - - OLineEdit *edit = new OLineEdit( 0, "lineedit" ); - - edit->setCompletionMode( OGlobalSettings::CompletionPopup ); - OCompletion* comp = edit->completionObject(); - - QStringList list; - list << "mickeyl@handhelds.org"; - list << "mickey@tm.informatik.uni-frankfurt.de"; - list << "mickey@vanille.de"; - - comp->setItems( list ); - - edit->show(); - -} - -void OpieUIDemo::demoOComboBox() -{ - odebug << "ocombobox" << oendl; - - OComboBox *combo = new OComboBox( true, 0, "combobox" ); - - combo->setCompletionMode( OGlobalSettings::CompletionPopup ); - OCompletion* comp = combo->completionObject(); - - QStringList ilist; - ilist << "kergoth@handhelds.org"; - ilist << "harlekin@handhelds.org"; - ilist << "groucho@handhelds.org"; - combo->insertStringList( ilist ); - - QStringList clist; - clist << "mickeyl@handhelds.org"; - clist << "mickey@tm.informatik.uni-frankfurt.de"; - clist << "mickey@vanille.de"; - comp->setItems( clist ); - - combo->show(); - -} - -void OpieUIDemo::demoOEditListBox() -{ - odebug << "oeditlistbox" << oendl; - - OEditListBox* edit = new OEditListBox( "OEditListBox", 0, "editlistbox" ); - - edit->lineEdit()->setCompletionMode( OGlobalSettings::CompletionPopup ); - OCompletion* comp = edit->lineEdit()->completionObject(); - QStringList clist; - clist << "Completion everywhere"; - clist << "Cool Completion everywhere"; - clist << "History History History"; - comp->setItems( clist ); - - QStringList list; - list << "kergoth@handhelds.org"; - list << "harlekin@handhelds.org"; - list << "groucho@handhelds.org"; - list << "mickeyl@handhelds.org"; - edit->insertStringList( list ); - - edit->show(); - -} - -void OpieUIDemo::demoOSelector() -{ - odebug << "oselector" << oendl; - - OHSSelector* sel = new OHSSelector( 0, "gradientselector" ); - //#sel->resize( QSize( 200, 30 ) ); - //#sel->setColors( QColor( 90, 190, 60 ), QColor( 200, 55, 255 ) ); - //#sel->setText( "Dark", "Light" ); - - sel->show(); -} - -void OpieUIDemo::messageBox( const QString& text ) -{ - QString info; - info = "You have selected '" + text + "'"; - QMessageBox::information( this, "OpieUIDemo", info ); -} diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h deleted file mode 100644 index 382885f..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h +++ b/dev/null @@ -1,60 +0,0 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -**********************************************************************/ - -#ifndef OPIEUIDEMO_H -#define OPIEUIDEMO_H - -#include <qmainwindow.h> - -namespace Opie { -namespace Ui { -class OVersatileView; -} -} -class QTabWidget; -class QVBox; - -class OpieUIDemo : public QMainWindow { - Q_OBJECT - -public: - - OpieUIDemo( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel ); - ~OpieUIDemo(); - - void demoOCompletionBox(); - void demoOLineEdit(); - void demoOComboBox(); - void demoOEditListBox(); - void demoOSelector(); - -public slots: - void demo( int ); - void messageBox( const QString& text ); - -protected: - void build(); - void buildVV( QVBox* b ); - -private: - QTabWidget* main; - - Opie::Ui::OVersatileView* vv; - -}; - - - -#endif diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp deleted file mode 100644 index e8bbdb1..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp +++ b/dev/null @@ -1,160 +0,0 @@ -/* - This file is part of the Opie Project - - Copyright (C) 2003 Michael 'Mickey' Lauer - <mickey@tm.informatik.uni-frankfurt.de> - =. - .=l. - .>+-= - _;:, .> :=|. This program is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -#include "oversatileviewdemo.h" -#include <opie2/oversatileview.h> -#include <opie2/oversatileviewitem.h> - -#include <qstring.h> -#include <qpixmap.h> -#include <qlistview.h> - -using namespace Opie::Ui; - -OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlags f ) - :QVBox( parent, name, f ) -{ - vv = new OVersatileView( this ); - - vv->addColumn( "First" ); - vv->addColumn( "2nd" ); - vv->addColumn( "IIIrd" ); - - QString counter; - - QPixmap leaf( "leaf.png" ); - QPixmap opened( "folder_opened.png" ); - QPixmap closed( "folder_closed.png" ); - - QPixmap leaf32( "leaf32.png" ); - QPixmap opened32( "folder_opened32.png" ); - QPixmap closed32( "folder_closed32.png" ); - - vv->setDefaultPixmaps( OVersatileView::Tree, leaf, opened, closed ); - vv->setDefaultPixmaps( OVersatileView::Icons, leaf32, opened32, closed32 ); - - OVersatileViewItem* item; - OVersatileViewItem* item2; - - for ( int i = 0; i < 5; ++i ) - { - counter.sprintf( "%d", i ); - item = new OVersatileViewItem( vv, "Item", "Text", "Some more", counter ); - item->setRenameEnabled( true ); - item2 = new OVersatileViewItem( item, "OSubitem", "123", "...", counter ); - item2->setRenameEnabled( true ); - - } - - connect( vv, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) ); - connect( vv, SIGNAL( selectionChanged(OVersatileViewItem*) ), this, SLOT( selectionChanged(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( currentChanged(OVersatileViewItem*) ), this, SLOT( currentChanged(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( clicked(OVersatileViewItem*) ), this, SLOT( clicked(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( pressed(OVersatileViewItem*) ), this, SLOT( pressed(OVersatileViewItem*) ) ); - - connect( vv, SIGNAL( doubleClicked(OVersatileViewItem*) ), this, SLOT( doubleClicked(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( returnPressed(OVersatileViewItem*) ), this, SLOT( returnPressed(OVersatileViewItem*) ) ); - - connect( vv, SIGNAL( onItem(OVersatileViewItem*) ), this, SLOT( onItem(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( onViewport() ), this, SLOT( onViewport() ) ); - - connect( vv, SIGNAL( expanded(OVersatileViewItem*) ), this, SLOT( expanded(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( collapsed(OVersatileViewItem*) ), this, SLOT( collapsed(OVersatileViewItem*) ) ); - - connect( vv, SIGNAL( moved() ), this, SLOT( moved() ) ); - - connect( vv, SIGNAL( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ) ); - -} - -OVersatileViewDemo::~OVersatileViewDemo() -{ -} - -void OVersatileViewDemo::selectionChanged() -{ - odebug << "received signal selectionChanged()" << oendl; -} -void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item ) -{ - odebug << "received signal selectionChanged(OVersatileViewItem*)" << oendl; -} -void OVersatileViewDemo::currentChanged( OVersatileViewItem * item ) -{ - odebug << "received signal currentChanged( OVersatileViewItem * )" << oendl; -} -void OVersatileViewDemo::clicked( OVersatileViewItem * item ) -{ - odebug << "received signal clicked( OVersatileViewItem * )" << oendl; -} -void OVersatileViewDemo::pressed( OVersatileViewItem * item ) -{ - odebug << "received signal pressed( OVersatileViewItem * )" << oendl; -} - -void OVersatileViewDemo::doubleClicked( OVersatileViewItem *item ) -{ - odebug << "received signal doubleClicked( OVersatileViewItem *item )" << oendl; -} -void OVersatileViewDemo::returnPressed( OVersatileViewItem *item ) -{ - odebug << "received signal returnPressed( OVersatileViewItem *item )" << oendl; -} - -void OVersatileViewDemo::onItem( OVersatileViewItem *item ) -{ - odebug << "received signal onItem( OVersatileViewItem *item )" << oendl; -} -void OVersatileViewDemo::onViewport() -{ - odebug << "received signal onViewport()" << oendl; -} - -void OVersatileViewDemo::expanded( OVersatileViewItem *item ) -{ - odebug << "received signal expanded( OVersatileViewItem *item )" << oendl; -} - -void OVersatileViewDemo::collapsed( OVersatileViewItem *item ) -{ - odebug << "received signal collapsed( OVersatileViewItem *item )" << oendl; -} - -void OVersatileViewDemo::moved() -{ - odebug << "received signal moved( OVersatileViewItem *item )" << oendl; -} - -void OVersatileViewDemo::contextMenuRequested( OVersatileViewItem *item, const QPoint& pos, int col ) -{ - odebug << "received signal contextMenuRequested( OVersatileViewItem *item )" << oendl; -} diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h deleted file mode 100644 index 35e2c3c..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h +++ b/dev/null @@ -1,77 +0,0 @@ -/* - This file is part of the Opie Project - - Copyright (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> - =. - .=l. - .>+-= - _;:, .> :=|. This program is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU Library General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This program is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more -++= -. .` .: details. - : = ...= . :.=- - -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with - -- :-=` this library; see the file COPYING.LIB. - If not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - -*/ - -#ifndef OVERSATILEVIEWDEMO_H -#define OVERSATILEVIEWDEMO_H - -#include <qvbox.h> - -namespace Opie { -namespace Ui { -class OVersatileView; -class OVersatileViewItem; -} -} - -class OVersatileViewDemo: public QVBox -{ - Q_OBJECT - - public: - OVersatileViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); - virtual ~OVersatileViewDemo(); - - public slots: - void selectionChanged(); - void selectionChanged( Opie::Ui::OVersatileViewItem * ); - void currentChanged( Opie::Ui::OVersatileViewItem * ); - void clicked( Opie::Ui::OVersatileViewItem * ); - void pressed( OPie::Ui::OVersatileViewItem * ); - - void doubleClicked( Opie::Ui::OVersatileViewItem *item ); - void returnPressed( Opie::Ui::OVersatileViewItem *item ); - - void onItem( Opie::Ui::OVersatileViewItem *item ); - void onViewport(); - - void expanded( Opie::Ui::OVersatileViewItem *item ); - void collapsed( Opie::Ui::OVersatileViewItem *item ); - - void moved(); - - void contextMenuRequested( Opie::Ui::OVersatileViewItem *item, const QPoint&, int col ); - - private: - Opie::Ui::OVersatileView* vv; - -}; - -#endif diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro deleted file mode 100644 index ff78095..0000000 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro +++ b/dev/null @@ -1,17 +0,0 @@ -TEMPLATE = app -CONFIG = qt warn_on -HEADERS = opieuidemo.h \ - oversatileviewdemo.h -SOURCES = opieuidemo.cpp \ - oversatileviewdemo.cpp \ - main.cpp -INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += $(OPIEDIR)/include -LIBS += -lopieui2 -lopiecore2 -TARGET = opieuidemo -MOC_DIR = moc -OBJECTS_DIR = obj - -include( $(OPIEDIR)/include.pro ) - - diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp deleted file mode 100644 index 272e42b..0000000 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.cpp +++ b/dev/null @@ -1,133 +0,0 @@ -/* - * You may use, modify and distribute this example without any limitation - */ - -#include "owidgetstack_example.h" - -/* OPIE */ -#include <opie2/oapplicationfactory.h> -#include <opie2/owidgetstack.h> -#include <qpe/resource.h> - -/* QT */ -#include <qaction.h> -#include <qtoolbar.h> -#include <qpopupmenu.h> -#include <qmenubar.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qsignalmapper.h> - -using namespace Opie::Core; -using namespace Opie::Ui; - -OPIE_EXPORT_APP( OApplicationFactory<StackExample> ) - -StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) - : QMainWindow( parent, name, fl ) -{ - m_stack = new OWidgetStack( this ); - setCentralWidget( m_stack ); - - /* nice Signal Mapper ;) */ - QSignalMapper *sm = new QSignalMapper(this); - connect(sm, SIGNAL(mapped(int) ), m_stack, SLOT(raiseWidget(int)) ); - - /* toolbar first but this should be known from the other examples */ - setToolBarsMovable( false ); - - /* only a menubar here */ - QToolBar* holder = new QToolBar( this ); - holder->setHorizontalStretchable( true ); - - QMenuBar *bar = new QMenuBar( holder ); - QPopupMenu *menu = new QPopupMenu( this ); - - QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), - QString::null, 0, this, 0 ); - sm->setMapping(a, 1 ); - connect(a, SIGNAL(activated() ), - sm, SLOT(map() ) ); - a->addTo( menu ); - - a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), - QString::null, 0, this, 0 ); - sm->setMapping(a, 2 ); - connect(a, SIGNAL(activated() ), - sm, SLOT(map() ) ); - a->addTo( menu ); - - a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), - QString::null, 0, this, 0 ); - sm->setMapping(a, 3 ); - connect(a, SIGNAL(activated() ), - sm, SLOT(map() ) ); - a->addTo( menu ); - - a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), - QString::null, 0, this, 0 ); - sm->setMapping(a, 4 ); - connect(a, SIGNAL(activated() ), - sm, SLOT(map() ) ); - - bar->insertItem( tr("Actions"), menu ); - - /* now the gui */ - - /* first widget, main widget */ - QWidget * wid = new QWidget( m_stack ); - QGridLayout *grid = new QGridLayout(wid, 2, 2 ); - - QPushButton *btn = new QPushButton( tr("Show Details Small"), wid, "details1" ); - sm->setMapping(btn, 2 ); - connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); - grid->addWidget( btn, 0, 0 ); - - btn = new QPushButton( tr("Show Details Medium"), wid, "details2"); - sm->setMapping(btn, 3 ); - connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); - grid->addWidget( btn, 0, 1 ); - - btn = new QPushButton( tr("Show Details All"), wid, "details3"); - sm->setMapping(btn, 4 ); - connect(btn, SIGNAL(clicked()), sm, SLOT(map() ) ); - grid->addWidget( btn, 1, 1 ); - - m_stack->addWidget( wid, 1 ); - m_main = wid; - - QLabel *lbl = new QLabel(m_stack ); - lbl->setText(tr("Only small Details are shown here. Määh") ); - m_stack->addWidget( lbl, 2 ); - - lbl = new QLabel( m_stack ); - lbl->setText( tr("Some more details....Wo ist das Schaf?") ); - m_stack->addWidget( lbl, 3 ); - - lbl = new QLabel( m_stack ); - lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Süd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") ); - m_stack->addWidget( lbl, 4 ); - - - /* THE signal mapper does all the magic */ - m_stack->raiseWidget( m_main ); -} - - -StackExample::~StackExample() { - -} - - - -void StackExample::closeEvent( QCloseEvent* ev) { - /* if the close even came when we displayed a details */ - if (m_stack->visibleWidget() != m_main ) { - m_stack->raiseWidget( m_main ); - ev->ignore(); - return; - } - - ev->accept(); -} diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h deleted file mode 100644 index c9b70cb..0000000 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.h +++ b/dev/null @@ -1,27 +0,0 @@ -/* - * You may use, modify and distribute this example without any limitation - */ - -#ifndef O_STACK_EXAMPLE_SIMPLE_H -#define O_STACK_EXAMPLE_SIMPLE_H - -#include <qmainwindow.h> -#include <opie2/owidgetstack.h> - - -class StackExample : public QMainWindow { - Q_OBJECT -public: - StackExample( QWidget* paren, const char* name, WFlags fl ); - ~StackExample(); - static QString appName() { return QString::fromLatin1("owidgetstack-example"); } - -protected: - void closeEvent( QCloseEvent* e ); -private: - Opie::Ui::OWidgetStack* m_stack; - QWidget* m_main; - -}; - -#endif diff --git a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro b/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro deleted file mode 100644 index 4cfce9c..0000000 --- a/libopie2/examples/opieui/owidgetstack_example/owidgetstack_example.pro +++ b/dev/null @@ -1,13 +0,0 @@ -CONFIG += qt warn_on -TEMPLATE = app -TARGET = owidgetstack-example - -SOURCES = owidgetstack_example.cpp -HEADERS = owidgetstack_example.h - -INCLUDEPATH += $(OPIEDIR)/include -DEPENDSPATH += $(OPIEDIR)/include - -LIBS += -lqpe -lopieui2 - -include( $(OPIEDIR)/include.pro ) diff --git a/libopie2/libopie2.pro b/libopie2/libopie2.pro index 509a3ce..fcb4160 100644 --- a/libopie2/libopie2.pro +++ b/libopie2/libopie2.pro @@ -1,8 +1,8 @@ TEMPLATE = subdirs -unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm opiesecurity examples +unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm opiesecurity !contains( platform, x11 ) { message( Configuring libopie2 for build on Opie ) include( $(OPIEDIR)/include.pro ) } |