From 95e533a6ac257d3b95cd8905660008fb7dcd33f1 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Thu, 01 May 2003 14:00:37 +0000 Subject: - restructure opieui example directory - start work on ONamedListViewItem providing a slightly higher level interface --- (limited to 'libopie2/examples/opieui') diff --git a/libopie2/examples/opieui/olistviewdemo/.cvsignore b/libopie2/examples/opieui/olistviewdemo/.cvsignore new file mode 100644 index 0000000..1317f7e --- a/dev/null +++ b/libopie2/examples/opieui/olistviewdemo/.cvsignore @@ -0,0 +1,8 @@ +Makefile* +moc* +*moc +*.o +~* +moc +obj + diff --git a/libopie2/examples/opieui/olistviewdemo/main.cpp b/libopie2/examples/opieui/olistviewdemo/main.cpp new file mode 100644 index 0000000..a93f361 --- a/dev/null +++ b/libopie2/examples/opieui/olistviewdemo/main.cpp @@ -0,0 +1,26 @@ +/********************************************************************** +** 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 + +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 new file mode 100644 index 0000000..31bda9d --- a/dev/null +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.cpp @@ -0,0 +1,54 @@ +/* +                 This file is part of the Opie Project + +              Copyright (C) 2003 Michael 'Mickey' Lauer + + =. + .=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_,=:_.      -`: 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" +#include + +#include +#include +#include + +OListViewDemo::OListViewDemo( QWidget* parent, const char* name, WFlags f ) + :QVBox( parent, name, f ) +{ + lv = new ONamedListView( this ); + 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" ); +} + +OListViewDemo::~OListViewDemo() +{ +} + diff --git a/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h new file mode 100644 index 0000000..8a5986a --- a/dev/null +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.h @@ -0,0 +1,51 @@ +/* +                 This file is part of the Opie Project + +              Copyright (C) 2003 Michael 'Mickey' Lauer + =. + .=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_,=:_.      -`: 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 +#include + +class OListViewDemo: public QVBox +{ + Q_OBJECT + + public: + OListViewDemo( QWidget* parent=0, const char* name=0, WFlags f=0 ); + virtual ~OListViewDemo(); + + private: + ONamedListView* lv; + +}; + +#endif diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro index 8ad5fc9..aabe733 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro +++ b/libopie2/examples/opieui/olistviewdemo/olistviewdemo.pro @@ -1,14 +1,12 @@ TEMPLATE = app CONFIG = qt warn_on debug -HEADERS = opieuidemo.h \ - oversatileviewdemo.h -SOURCES = opieuidemo.cpp \ - oversatileviewdemo.cpp \ +HEADERS = olistviewdemo.h +SOURCES = olistviewdemo.cpp \ main.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lopieui2 -lopiecore2 -TARGET = opieuidemo +TARGET = olistviewdemo MOC_DIR = moc OBJECTS_DIR = obj diff --git a/libopie2/examples/opieui/opieui.pro b/libopie2/examples/opieui/opieui.pro new file mode 100644 index 0000000..b52f013 --- a/dev/null +++ b/libopie2/examples/opieui/opieui.pro @@ -0,0 +1,3 @@ +TEMPLATE = subdirs +SUBDIRS = olistviewdemo oversatileviewdemo + diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro index 8ad5fc9..8ad5fc9 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieui.pro +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.pro -- cgit v0.9.0.2