summaryrefslogtreecommitdiff
path: root/examples/simple-pim/simple.cpp
Unidiff
Diffstat (limited to 'examples/simple-pim/simple.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/simple-pim/simple.cpp39
1 files changed, 20 insertions, 19 deletions
diff --git a/examples/simple-pim/simple.cpp b/examples/simple-pim/simple.cpp
index 029e71b..50905bf 100644
--- a/examples/simple-pim/simple.cpp
+++ b/examples/simple-pim/simple.cpp
@@ -18,7 +18,7 @@
18#include <qpe/timestring.h> 18#include <qpe/timestring.h>
19 19
20#include <opie/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching 20#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching
21#include <opie/otabwidget.h> 21#include <opie2/otabwidget.h>
22#include <opie/owait.h> 22#include <opie2/owait.h>
23 23
24#include "simple.h" 24#include "simple.h"
@@ -36,4 +36,5 @@
36 */ 36 */
37 37
38using namespace Opie::Core;
38OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) 39OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
39 40
@@ -51,5 +52,5 @@ MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl )
51 * Tab widget as central 52 * Tab widget as central
52 */ 53 */
53 m_tab = new OTabWidget(this); 54 m_tab = new Opie::Ui::OTabWidget(this);
54 55
55 setCentralWidget( m_tab ); 56 setCentralWidget( m_tab );
@@ -212,5 +213,5 @@ void MainWindow::slotLoad() {
212 213
213 /* we will provide a wait scrren */ 214 /* we will provide a wait scrren */
214 m_loading = new OWait(this, "wait screen" ); 215 m_loading = new Opie::Ui::OWait(this, "wait screen" );
215} 216}
216 217
@@ -277,5 +278,5 @@ void MainWindow::slotShow() {
277 278
278/* as answer this slot will be called */ 279/* as answer this slot will be called */
279void MainWindow::slotShowRecord( const OPimRecord& rec) { 280void MainWindow::slotShowRecord( const Opie::OPimRecord& rec) {
280 /* got a parent but still is a toplevel MODAL dialog */ 281 /* got a parent but still is a toplevel MODAL dialog */
281 QDialog* dia = new QDialog(this,"dialog",TRUE ); 282 QDialog* dia = new QDialog(this,"dialog",TRUE );
@@ -345,5 +346,5 @@ namespace {
345 * so only one constructor with a QListView as parent 346 * so only one constructor with a QListView as parent
346 */ 347 */
347 PIMListViewItem( QListView*, OPimRecord* record ); 348 PIMListViewItem( QListView*, Opie::OPimRecord* record );
348 ~PIMListViewItem(); 349 ~PIMListViewItem();
349 350
@@ -351,11 +352,11 @@ namespace {
351 * items. Values greater than 1000 should be used */ 352 * items. Values greater than 1000 should be used */
352 int rtti()const; 353 int rtti()const;
353 OPimRecord* record()const; 354 Opie::OPimRecord* record()const;
354 355
355 private: 356 private:
356 OPimRecord* m_record; 357 Opie::OPimRecord* m_record;
357 }; 358 };
358 359
359 PIMListViewItem::PIMListViewItem( QListView *p, OPimRecord* rec ) 360 PIMListViewItem::PIMListViewItem( QListView *p, Opie::OPimRecord* rec )
360 : QListViewItem(p), m_record( rec ) { 361 : QListViewItem(p), m_record( rec ) {
361 } 362 }
@@ -366,5 +367,5 @@ namespace {
366 } 367 }
367 368
368 OPimRecord* PIMListViewItem::record()const { 369 Opie::OPimRecord* PIMListViewItem::record()const {
369 return m_record; 370 return m_record;
370 } 371 }
@@ -383,26 +384,26 @@ PIMListView::~PIMListView() {
383} 384}
384 385
385void PIMListView::set( OTodoAccess::List list ) { 386void PIMListView::set( Opie::OPimTodoAccess::List list ) {
386 /* clear first and then add new items */ 387 /* clear first and then add new items */
387 clear(); 388 clear();
388 389
389 OTodoAccess::List::Iterator it; 390 Opie::OPimTodoAccess::List::Iterator it;
390 for (it = list.begin(); it != list.end(); ++it ) { 391 for (it = list.begin(); it != list.end(); ++it ) {
391 /* 392 /*
392 * make a new item which automatically gets added to the listview 393 * make a new item which automatically gets added to the listview
393 * and call the copy c'tor to create a new OTodo 394 * and call the copy c'tor to create a new OPimTodo
394 */ 395 */
395 PIMListViewItem *i = new PIMListViewItem(this, new OTodo( *it ) ); 396 PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimTodo( *it ) );
396 i->setText(0, (*it).summary() ); 397 i->setText(0, (*it).summary() );
397 } 398 }
398} 399}
399 400
400void PIMListView::set( const OEffectiveEvent::ValueList& lst ) { 401void PIMListView::set( const Opie::OEffectiveEvent::ValueList& lst ) {
401 /* clear first and then add items */ 402 /* clear first and then add items */
402 clear(); 403 clear();
403 404
404 OEffectiveEvent::ValueList::ConstIterator it; 405 Opie::OEffectiveEvent::ValueList::ConstIterator it;
405 for ( it = lst.begin(); it != lst.end(); ++it ) { 406 for ( it = lst.begin(); it != lst.end(); ++it ) {
406 PIMListViewItem *i = new PIMListViewItem(this, new OEvent( (*it).event() ) ); 407 PIMListViewItem *i = new PIMListViewItem(this, new Opie::OPimEvent( (*it).event() ) );
407 i->setText( 0, PIMListView::makeString( (*it) ) ); 408 i->setText( 0, PIMListView::makeString( (*it) ) );
408 } 409 }
@@ -426,5 +427,5 @@ void PIMListView::showCurrentRecord() {
426} 427}
427 428
428QString PIMListView::makeString( const OEffectiveEvent& ev ) { 429QString PIMListView::makeString( const Opie::OEffectiveEvent& ev ) {
429 QString str; 430 QString str;
430 str += ev.description(); 431 str += ev.description();