author | mickeyl <mickeyl> | 2003-03-28 15:11:52 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-28 15:11:52 (UTC) |
commit | 11304d02942e9fa493e4e80943a828f9c65f6772 (patch) (side-by-side diff) | |
tree | a0223c10c067e1afc70d15c2b82be3f3c15e41ae /libopie2/examples/opieui/oversatileviewdemo | |
parent | b271d575fa05cf570a1a829136517761bd47e69b (diff) | |
download | opie-11304d02942e9fa493e4e80943a828f9c65f6772.zip opie-11304d02942e9fa493e4e80943a828f9c65f6772.tar.gz opie-11304d02942e9fa493e4e80943a828f9c65f6772.tar.bz2 |
skeleton and the start of libopie2, please read README, ROADMAP and STATUS and comment...
Diffstat (limited to 'libopie2/examples/opieui/oversatileviewdemo') (more/less context) (ignore whitespace changes)
24 files changed, 538 insertions, 0 deletions
diff --git a/libopie2/examples/opieui/oversatileviewdemo/1.png b/libopie2/examples/opieui/oversatileviewdemo/1.png Binary files differnew file mode 100644 index 0000000..0e2e41b --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/1.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/1small.png b/libopie2/examples/opieui/oversatileviewdemo/1small.png Binary files differnew file mode 100644 index 0000000..ce6b262 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/1small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/2.png b/libopie2/examples/opieui/oversatileviewdemo/2.png Binary files differnew file mode 100644 index 0000000..8a0181d --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/2.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/2small.png b/libopie2/examples/opieui/oversatileviewdemo/2small.png Binary files differnew file mode 100644 index 0000000..82a4431 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/2small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/3.png b/libopie2/examples/opieui/oversatileviewdemo/3.png Binary files differnew file mode 100644 index 0000000..8a58d6c --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/3.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/3small.png b/libopie2/examples/opieui/oversatileviewdemo/3small.png Binary files differnew file mode 100644 index 0000000..073ba55 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/3small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/4.png b/libopie2/examples/opieui/oversatileviewdemo/4.png Binary files differnew file mode 100644 index 0000000..198891b --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/4.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/4small.png b/libopie2/examples/opieui/oversatileviewdemo/4small.png Binary files differnew file mode 100644 index 0000000..7f1cc01 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/4small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/5.png b/libopie2/examples/opieui/oversatileviewdemo/5.png Binary files differnew file mode 100644 index 0000000..ee7344a --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/5.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/5small.png b/libopie2/examples/opieui/oversatileviewdemo/5small.png Binary files differnew file mode 100644 index 0000000..105b038 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/5small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/6.png b/libopie2/examples/opieui/oversatileviewdemo/6.png Binary files differnew file mode 100644 index 0000000..72c3692 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/6.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/6small.png b/libopie2/examples/opieui/oversatileviewdemo/6small.png Binary files differnew file mode 100644 index 0000000..1db2a30 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/6small.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png Binary files differnew file mode 100644 index 0000000..4157333 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/folder_closed.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png Binary files differnew file mode 100644 index 0000000..acc992c --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/folder_closed32.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png Binary files differnew file mode 100644 index 0000000..5e7e37e --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/folder_opened.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png b/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png Binary files differnew file mode 100644 index 0000000..acd3265 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/folder_opened32.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf.png b/libopie2/examples/opieui/oversatileviewdemo/leaf.png Binary files differnew file mode 100644 index 0000000..c8435ec --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/leaf.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/leaf32.png b/libopie2/examples/opieui/oversatileviewdemo/leaf32.png Binary files differnew file mode 100644 index 0000000..5e90ead --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/leaf32.png diff --git a/libopie2/examples/opieui/oversatileviewdemo/main.cpp b/libopie2/examples/opieui/oversatileviewdemo/main.cpp new file mode 100644 index 0000000..d8c01a4 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/main.cpp @@ -0,0 +1,29 @@ +/********************************************************************** +** 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> + +int main( int argc, char **argv ) +{ + OApplication a( argc, argv, "Opie UI Demo" ); + qDebug( "." ); + OpieUIDemo e; + qDebug( "." ); + a.showMainWidget(&e); + qDebug( "." ); + return a.exec(); +} diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro b/libopie2/examples/opieui/oversatileviewdemo/opieui.pro new file mode 100644 index 0000000..8ad5fc9 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/opieui.pro @@ -0,0 +1,17 @@ +TEMPLATE = app +CONFIG = qt warn_on debug +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/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp new file mode 100644 index 0000000..197669c --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp @@ -0,0 +1,205 @@ +/********************************************************************** +** 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 + +#ifdef QWS +#include <qpe/qpeapplication.h> +#include <qpe/global.h> +#endif + +// Opie + +#ifdef QWS +#include <opie/odevice.h> +using namespace Opie; +#endif + +#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" + +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() +{ + qDebug( "ocompletionbox" ); + + 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() +{ + qDebug( "olineedit" ); + + 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() +{ + qDebug( "ocombobox" ); + + 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() +{ + qDebug( "oeditlistbox" ); + + 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() +{ + qDebug( "oselector" ); + + 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 new file mode 100644 index 0000000..0519ae6 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.h @@ -0,0 +1,56 @@ +/********************************************************************** +** 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> + +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; + + OVersatileView* vv; + +}; + + + +#endif diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp new file mode 100644 index 0000000..cf1e443 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp @@ -0,0 +1,158 @@ +/* + 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> + +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() +{ + qDebug( "received signal selectionChanged()" ); +} +void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item ) +{ + qDebug( "received signal selectionChanged(OVersatileViewItem*)" ); +} +void OVersatileViewDemo::currentChanged( OVersatileViewItem * item ) +{ + qDebug( "received signal currentChanged( OVersatileViewItem * )" ); +} +void OVersatileViewDemo::clicked( OVersatileViewItem * item ) +{ + qDebug( "received signal clicked( OVersatileViewItem * )" ); +} +void OVersatileViewDemo::pressed( OVersatileViewItem * item ) +{ + qDebug( "received signal pressed( OVersatileViewItem * )" ); +} + +void OVersatileViewDemo::doubleClicked( OVersatileViewItem *item ) +{ + qDebug( "received signal doubleClicked( OVersatileViewItem *item )" ); +} +void OVersatileViewDemo::returnPressed( OVersatileViewItem *item ) +{ + qDebug( "received signal returnPressed( OVersatileViewItem *item )" ); +} + +void OVersatileViewDemo::onItem( OVersatileViewItem *item ) +{ + qDebug( "received signal onItem( OVersatileViewItem *item )" ); +} +void OVersatileViewDemo::onViewport() +{ + qDebug( "received signal onViewport()" ); +} + +void OVersatileViewDemo::expanded( OVersatileViewItem *item ) +{ + qDebug( "received signal expanded( OVersatileViewItem *item )" ); +} + +void OVersatileViewDemo::collapsed( OVersatileViewItem *item ) +{ + qDebug( "received signal collapsed( OVersatileViewItem *item )" ); +} + +void OVersatileViewDemo::moved() +{ + qDebug( "received signal moved( OVersatileViewItem *item )" ); +} + +void OVersatileViewDemo::contextMenuRequested( OVersatileViewItem *item, const QPoint& pos, int col ) +{ + qDebug( "received signal contextMenuRequested( OVersatileViewItem *item )" ); +} diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h new file mode 100644 index 0000000..79318d0 --- a/dev/null +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.h @@ -0,0 +1,73 @@ +/* + 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> + +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( OVersatileViewItem * ); + void currentChanged( OVersatileViewItem * ); + void clicked( OVersatileViewItem * ); + void pressed( OVersatileViewItem * ); + + void doubleClicked( OVersatileViewItem *item ); + void returnPressed( OVersatileViewItem *item ); + + void onItem( OVersatileViewItem *item ); + void onViewport(); + + void expanded( OVersatileViewItem *item ); + void collapsed( OVersatileViewItem *item ); + + void moved(); + + void contextMenuRequested( OVersatileViewItem *item, const QPoint&, int col ); + + private: + OVersatileView* vv; + +}; + +#endif |