summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp5
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.h4
-rw-r--r--libopie2/examples/opieui/osplitter_example/osplitter_mail.pro2
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/.cvsignore6
-rw-r--r--libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp40
-rw-r--r--libopie2/opiecore/xmltree.cc11
-rw-r--r--libopie2/templates/cpp.cpp2
7 files changed, 39 insertions, 31 deletions
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
index 4eaf3a9..a75f9dc 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp
@@ -1,30 +1,27 @@
#include <qstring.h>
#include <qlabel.h>
#include <qheader.h>
#include <qlayout.h>
#include <qpe/qpeapplication.h>
-#include <opie/oapplicationfactory.h>
-
-#include "../osplitter.h"
+#include <opie2/oapplicationfactory.h>
#include "osplitter_mail.h"
-
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 );
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
index b7e7efe..1447a92 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.h
@@ -1,32 +1,36 @@
/*
* 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>
+
+using Opie::OSplitter;
+
class Folder;
class QLabel;
class OSplitter;
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 );
diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro b/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro
index ec6e626..dd1bef2 100644
--- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro
+++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.pro
@@ -1,12 +1,12 @@
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 -lopie
+LIBS += -lqpe -lopieui2
include ( $(OPIEDIR)/include.pro )
diff --git a/libopie2/examples/opieui/oversatileviewdemo/.cvsignore b/libopie2/examples/opieui/oversatileviewdemo/.cvsignore
new file mode 100644
index 0000000..8f7300c
--- a/dev/null
+++ b/libopie2/examples/opieui/oversatileviewdemo/.cvsignore
@@ -0,0 +1,6 @@
+Makefile*
+moc*
+*moc
+*.o
+~*
+
diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
index 197669c..f62729c 100644
--- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
+++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp
@@ -20,186 +20,186 @@
#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>
+#include <opie2/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/opiecore/xmltree.cc b/libopie2/opiecore/xmltree.cc
index 27db5b3..059791b 100644
--- a/libopie2/opiecore/xmltree.cc
+++ b/libopie2/opiecore/xmltree.cc
@@ -4,34 +4,35 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
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.
*/
+#include <opie2/xmltree.h>
+
#include <qpe/stringutil.h>
-#include <opie/xmltree.h>
#include <qxml.h>
#include <assert.h>
using namespace Opie;
XMLElement::XMLElement()
: m_parent( 0 ), m_next( 0 ), m_prev( 0 ), m_first( 0 ), m_last( 0 )
{
}
XMLElement::~XMLElement()
{
XMLElement *n = m_first;
@@ -73,66 +74,66 @@ void XMLElement::insertAfter( XMLElement *newChild, XMLElement *refChild )
assert( refChild );
assert( refChild->m_parent );
assert( refChild->m_parent == this );
if ( newChild->m_parent && newChild != refChild )
newChild->m_parent->removeChild( newChild );
newChild->m_parent = this;
XMLElement *next = refChild->m_next;
refChild->m_next = newChild;
newChild->m_prev = refChild;
newChild->m_next = next;
-
+
if ( next )
next->m_prev = newChild;
}
QString XMLElement::attribute( const QString &attr ) const
{
AttributeMap::ConstIterator it = m_attributes.find( attr );
if ( it == m_attributes.end() )
- return QString::null;
+ return QString::null;
return it.data();
}
void XMLElement::setAttribute( const QString &attr, const QString &value )
{
m_attributes.replace( attr, value );
}
void XMLElement::insertBefore( XMLElement *newChild, XMLElement *refChild )
{
assert( refChild );
assert( refChild->m_parent );
assert( refChild->m_parent == this );
assert( newChild != refChild );
if ( newChild->m_parent && newChild != refChild )
newChild->m_parent->removeChild( newChild );
newChild->m_parent = this;
XMLElement *prev = refChild->m_prev;
refChild->m_prev = newChild;
-
+
newChild->m_prev = prev;
newChild->m_next = refChild;
if ( prev )
prev->m_next = newChild;
if ( refChild == m_first )
m_first = newChild;
}
void XMLElement::removeChild( XMLElement *child )
{
if ( child->m_parent != this )
return;
if ( m_first == child )
@@ -268,33 +269,33 @@ bool Handler::endElement( const QString &, const QString &, const QString & )
bool Handler::characters( const QString &ch )
{
XMLElement *textNode = new XMLElement;
textNode->setValue( ch );
m_node->appendChild( textNode );
return true;
}
XMLElement *XMLElement::namedItem( const QString &name )
{
XMLElement *e = m_first;
for (; e; e = e->nextChild() )
if ( e->tagName() == name )
return e;
- return 0;
+ return 0;
}
XMLElement *XMLElement::clone() const
{
XMLElement *res = new XMLElement;
res->setTagName( m_tag );
res->setValue( m_value );
res->setAttributes( m_attributes );
XMLElement *e = m_first;
for (; e; e = e->m_next )
res->appendChild( e->clone() );
return res;
}
diff --git a/libopie2/templates/cpp.cpp b/libopie2/templates/cpp.cpp
index da5bcf0..cb1642f 100644
--- a/libopie2/templates/cpp.cpp
+++ b/libopie2/templates/cpp.cpp
@@ -14,29 +14,29 @@
    .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 <opie/h.h>
+#include <opie2/h.h>
/* OPIE */
opie (and for now, qpe) includes here
/* QT */
qte includes here
/* STD */
standard includes here
using namespace Opie;