summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/big-screen/osplitter.cpp25
-rw-r--r--libopie2/opieui/big-screen/owidgetstack.cpp5
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp5
-rw-r--r--libopie2/opieui/olistview.cpp16
-rw-r--r--libopie2/opieui/opopupmenu.cpp30
-rw-r--r--libopie2/opieui/otaskbarapplet.h10
-rw-r--r--libqtaux/oticker.cpp10
7 files changed, 56 insertions, 45 deletions
diff --git a/libopie2/opieui/big-screen/osplitter.cpp b/libopie2/opieui/big-screen/osplitter.cpp
index f0287ed..f50e7f0 100644
--- a/libopie2/opieui/big-screen/osplitter.cpp
+++ b/libopie2/opieui/big-screen/osplitter.cpp
@@ -27,12 +27,13 @@
27*/ 27*/
28 28
29#include "osplitter.h" 29#include "osplitter.h"
30 30
31/* OPIE */ 31/* OPIE */
32#include <opie2/otabwidget.h> 32#include <opie2/otabwidget.h>
33#include <opie2/odebug.h>
33 34
34/* QT */ 35/* QT */
35#include <qvaluelist.h> 36#include <qvaluelist.h>
36#include <qvbox.h> 37#include <qvbox.h>
37 38
38using namespace Opie::Ui; 39using namespace Opie::Ui;
@@ -78,13 +79,13 @@ OSplitter::OSplitter( Orientation orient, QWidget* parent, const char* name, WFl
78 * Destructor destructs this object and cleans up. All child 79 * Destructor destructs this object and cleans up. All child
79 * widgets will be deleted 80 * widgets will be deleted
80 * @see addWidget 81 * @see addWidget
81 */ 82 */
82OSplitter::~OSplitter() 83OSplitter::~OSplitter()
83{ 84{
84 qWarning("Deleted Splitter"); 85 owarn << "Deleted Splitter" << oendl;
85 m_splitter.setAutoDelete( true ); 86 m_splitter.setAutoDelete( true );
86 m_splitter.clear(); 87 m_splitter.clear();
87 88
88 delete m_hbox; 89 delete m_hbox;
89 delete m_tabWidget; 90 delete m_tabWidget;
90} 91}
@@ -207,13 +208,13 @@ void OSplitter::removeWidget( OSplitter* split)
207 */ 208 */
208void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label ) 209void OSplitter::addWidget( QWidget* wid, const QString& icon, const QString& label )
209{ 210{
210#ifdef DEBUG 211#ifdef DEBUG
211 if (!wid ) 212 if (!wid )
212 { 213 {
213 qWarning("Widget is not valid!"); 214 owarn << "Widget is not valid!" << oendl;
214 return; 215 return;
215 } 216 }
216#endif 217#endif
217 OSplitterContainer cont; 218 OSplitterContainer cont;
218 cont.widget = wid; 219 cont.widget = wid;
219 cont.icon =icon; 220 cont.icon =icon;
@@ -363,15 +364,15 @@ QSize OSplitter::minimumSizeHint()const
363void OSplitter::resizeEvent( QResizeEvent* res ) 364void OSplitter::resizeEvent( QResizeEvent* res )
364{ 365{
365 QFrame::resizeEvent( res ); 366 QFrame::resizeEvent( res );
366 /* 367 /*
367 * 368 *
368 */ 369 */
369 // qWarning("Old size was width = %d height = %d", res->oldSize().width(), res->oldSize().height() ); 370 // owarn << "Old size was width = " << res->oldSize().width() << " height = " << res->oldSize().height() << "" << oendl;
370 bool mode = true; 371 bool mode = true;
371 qWarning("New size is width = %d height = %d %s", res->size().width(), res->size().height(), name() ); 372 owarn << "New size is width = " << res->size().width() << " height = " << res->size().height() << " " << name() << "" << oendl;
372 if ( res->size().width() > m_size_policy && 373 if ( res->size().width() > m_size_policy &&
373 m_orient == Horizontal ) 374 m_orient == Horizontal )
374 { 375 {
375 changeHBox(); 376 changeHBox();
376 mode = false; 377 mode = false;
377 } 378 }
@@ -382,13 +383,13 @@ void OSplitter::resizeEvent( QResizeEvent* res )
382 { 383 {
383 changeTab(); 384 changeTab();
384 } 385 }
385 else if ( res->size().height() > m_size_policy && 386 else if ( res->size().height() > m_size_policy &&
386 m_orient == Vertical ) 387 m_orient == Vertical )
387 { 388 {
388 qWarning("Changng to vbox %s", name() ); 389 owarn << "Changng to vbox " << name() << "" << oendl;
389 changeVBox(); 390 changeVBox();
390 mode = false; 391 mode = false;
391 } 392 }
392 393
393 emit sizeChanged(mode, m_orient ); 394 emit sizeChanged(mode, m_orient );
394} 395}
@@ -441,13 +442,13 @@ void OSplitter::changeTab()
441 raise(); 442 raise();
442 show(); 443 show();
443 m_tabWidget->setGeometry( frameRect() ); 444 m_tabWidget->setGeometry( frameRect() );
444 return; 445 return;
445 } 446 }
446 447
447 qWarning(" New Tab Widget %s", name() ); 448 owarn << " New Tab Widget " << name() << "" << oendl;
448 /* 449 /*
449 * and add all widgets this will reparent them 450 * and add all widgets this will reparent them
450 * delete m_hbox set it to 0 451 * delete m_hbox set it to 0
451 * 452 *
452 */ 453 */
453 OTabWidget *tab; 454 OTabWidget *tab;
@@ -468,13 +469,13 @@ void OSplitter::changeTab()
468 469
469 connect(tab, SIGNAL(currentChanged(QWidget*) ), 470 connect(tab, SIGNAL(currentChanged(QWidget*) ),
470 this, SIGNAL(currentChanged(QWidget*) ) ); 471 this, SIGNAL(currentChanged(QWidget*) ) );
471 472
472 for ( ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) 473 for ( ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it )
473 { 474 {
474 qWarning("Widget is %s", (*it).name.latin1() ); 475 owarn << "Widget is " << (*it).name << "" << oendl;
475 addToTab( (*it) ); 476 addToTab( (*it) );
476 } 477 }
477 478
478 for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) 479 for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() )
479 { 480 {
480 split->reparent(this, 0, QPoint(0, 0) ); 481 split->reparent(this, 0, QPoint(0, 0) );
@@ -501,26 +502,26 @@ void OSplitter::changeHBox()
501 if (m_hbox ) 502 if (m_hbox )
502 { 503 {
503 m_hbox->setGeometry( frameRect() ); 504 m_hbox->setGeometry( frameRect() );
504 return; 505 return;
505 } 506 }
506 507
507 qWarning("new HBox %s", name() ); 508 owarn << "new HBox " << name() << "" << oendl;
508 m_hbox = new QHBox( this ); 509 m_hbox = new QHBox( this );
509 commonChangeBox(); 510 commonChangeBox();
510} 511}
511 512
512void OSplitter::changeVBox() 513void OSplitter::changeVBox()
513{ 514{
514 if (m_hbox ) 515 if (m_hbox )
515 { 516 {
516 m_hbox->setGeometry( frameRect() ); 517 m_hbox->setGeometry( frameRect() );
517 return; 518 return;
518 } 519 }
519 520
520 qWarning("New VBOX %s", name() ); 521 owarn << "New VBOX " << name() << "" << oendl;
521 m_hbox = new QVBox( this ); 522 m_hbox = new QVBox( this );
522 523
523 commonChangeBox(); 524 commonChangeBox();
524 525
525} 526}
526 527
@@ -529,20 +530,20 @@ void OSplitter::changeVBox()
529 * first remove and add children 530 * first remove and add children
530 * the other splitters 531 * the other splitters
531 * it is recursive as well due the call to setTabWidget 532 * it is recursive as well due the call to setTabWidget
532 */ 533 */
533void OSplitter::commonChangeBox() 534void OSplitter::commonChangeBox()
534{ 535{
535 qWarning(" Name of Splitters is %s", name() ); 536 owarn << " Name of Splitters is " << name() << "" << oendl;
536 537
537 for (ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it ) 538 for (ContainerList::Iterator it = m_container.begin(); it != m_container.end(); ++it )
538 { 539 {
539 /* only if parent tab.. m_tabWidgets gets deleted and would do that as well */ 540 /* only if parent tab.. m_tabWidgets gets deleted and would do that as well */
540 if (m_parentTab ) 541 if (m_parentTab )
541 removeFromTab( (*it).widget ); 542 removeFromTab( (*it).widget );
542 qWarning("Adding to box %s", (*it).name.latin1() ); 543 owarn << "Adding to box " << (*it).name << "" << oendl;
543 addToBox( (*it) ); 544 addToBox( (*it) );
544 } 545 }
545 for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() ) 546 for ( OSplitter* split = m_splitter.first(); split; split = m_splitter.next() )
546 { 547 {
547 /* tell them the world had changed */ 548 /* tell them the world had changed */
548 split->setTabWidget( 0 ); 549 split->setTabWidget( 0 );
@@ -556,13 +557,13 @@ void OSplitter::commonChangeBox()
556 557
557 558
558 if (m_parentTab ) 559 if (m_parentTab )
559 m_parentTab->addTab(m_hbox, iconName(), label() ); 560 m_parentTab->addTab(m_hbox, iconName(), label() );
560 else 561 else
561 { 562 {
562 qWarning(" setting Box geometry for %s", name() ); 563 owarn << " setting Box geometry for " << name() << "" << oendl;
563 m_hbox->setGeometry( frameRect() ); 564 m_hbox->setGeometry( frameRect() );
564 m_hbox->show(); 565 m_hbox->show();
565 delete m_tabWidget; 566 delete m_tabWidget;
566 m_tabWidget = 0; 567 m_tabWidget = 0;
567 show(); // also show this widget 568 show(); // also show this widget
568 } 569 }
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp
index a0a6355..de7f83f 100644
--- a/libopie2/opieui/big-screen/owidgetstack.cpp
+++ b/libopie2/opieui/big-screen/owidgetstack.cpp
@@ -25,12 +25,15 @@
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "owidgetstack.h" 29#include "owidgetstack.h"
30 30
31/* OPIE */
32#include <opie2/odebug.h>
33
31/* QT */ 34/* QT */
32#include <qapplication.h> 35#include <qapplication.h>
33#include <qwidgetstack.h> 36#include <qwidgetstack.h>
34 37
35namespace Opie { 38namespace Opie {
36namespace Ui { 39namespace Ui {
@@ -304,13 +307,13 @@ void OWidgetStack::hideWidget( QWidget* wid) {
304 307
305 raiseWidget( wid ); 308 raiseWidget( wid );
306} 309}
307 310
308 311
309bool OWidgetStack::eventFilter( QObject* obj, QEvent* e) { 312bool OWidgetStack::eventFilter( QObject* obj, QEvent* e) {
310 qWarning(" %s %s", obj->name(), obj->className() ); 313 owarn << " " << obj->name() << " " << obj->className() << "" << oendl;
311 if ( e->type() == QEvent::Resize ) { 314 if ( e->type() == QEvent::Resize ) {
312 QResizeEvent *res = static_cast<QResizeEvent*>( e ); 315 QResizeEvent *res = static_cast<QResizeEvent*>( e );
313 QSize size = res->size(); 316 QSize size = res->size();
314 if ( size.width() >= mode_size ) 317 if ( size.width() >= mode_size )
315 switchTop(); 318 switchTop();
316 else 319 else
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp
index a9ec8c4..1f6ca05 100644
--- a/libopie2/opieui/fileselector/ofileselector.cpp
+++ b/libopie2/opieui/fileselector/ofileselector.cpp
@@ -33,12 +33,13 @@
33#undef private 33#undef private
34 34
35#include "ofileselector_p.h" 35#include "ofileselector_p.h"
36 36
37/* OPIE */ 37/* OPIE */
38#include <opie2/ofileselector.h> 38#include <opie2/ofileselector.h>
39#include <opie2/odebug.h>
39 40
40#include <qpe/qpeapplication.h> 41#include <qpe/qpeapplication.h>
41#include <qpe/mimetype.h> 42#include <qpe/mimetype.h>
42#include <qpe/resource.h> 43#include <qpe/resource.h>
43#include <qpe/storage.h> 44#include <qpe/storage.h>
44 45
@@ -543,13 +544,13 @@ void OFileViewFileListView::slotCurrentChanged( QListViewItem* item)
543 if (!sel->isDir() ) 544 if (!sel->isDir() )
544 { 545 {
545 selector()->m_lneEdit->setText( sel->text(1) ); 546 selector()->m_lneEdit->setText( sel->text(1) );
546 // if in fileselector mode we will emit selected 547 // if in fileselector mode we will emit selected
547 if ( selector()->mode() == OFileSelector::FileSelector ) 548 if ( selector()->mode() == OFileSelector::FileSelector )
548 { 549 {
549 qWarning("slot Current Changed"); 550 owarn << "slot Current Changed" << oendl;
550 QStringList str = QStringList::split("->", sel->text(1) ); 551 QStringList str = QStringList::split("->", sel->text(1) );
551 QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); 552 QString path = sel->directory() + "/" + str[0].stripWhiteSpace();
552 emit selector()->fileSelected( path ); 553 emit selector()->fileSelected( path );
553 DocLnk lnk( path ); 554 DocLnk lnk( path );
554 emit selector()->fileSelected( lnk ); 555 emit selector()->fileSelected( lnk );
555 } 556 }
@@ -571,13 +572,13 @@ void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const
571 m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); 572 m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace();
572 emit selector()->dirSelected( m_currentDir ); 573 emit selector()->dirSelected( m_currentDir );
573 reread( m_all ); 574 reread( m_all );
574 } 575 }
575 else 576 else
576 { // file 577 { // file
577 qWarning("slot Clicked"); 578 owarn << "slot Clicked" << oendl;
578 selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); 579 selector()->m_lneEdit->setText( str[0].stripWhiteSpace() );
579 QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); 580 QString path = sel->directory() + "/" + str[0].stripWhiteSpace();
580 emit selector()->fileSelected( path ); 581 emit selector()->fileSelected( path );
581 DocLnk lnk( path ); 582 DocLnk lnk( path );
582 emit selector()->fileSelected( lnk ); 583 emit selector()->fileSelected( lnk );
583 } 584 }
diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp
index d7c92fd..0b3bdea 100644
--- a/libopie2/opieui/olistview.cpp
+++ b/libopie2/opieui/olistview.cpp
@@ -184,13 +184,13 @@ void OListView::serializeFrom( QDataStream& s )
184 while ( columns() < cols ) addColumn( QString::null ); 184 while ( columns() < cols ) addColumn( QString::null );
185 185
186 for ( int i = 0; i < cols; ++i ) 186 for ( int i = 0; i < cols; ++i )
187 { 187 {
188 QString coltext; 188 QString coltext;
189 s >> coltext; 189 s >> coltext;
190 qDebug( "read text '%s' for column %d", (const char*) coltext, i ); 190 odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
191 setColumnText( i, coltext ); 191 setColumnText( i, coltext );
192 } 192 }
193 193
194 int items; 194 int items;
195 s >> items; 195 s >> items;
196 odebug << "read number of items = " << items << oendl; 196 odebug << "read number of items = " << items << oendl;
@@ -439,19 +439,19 @@ void OListViewItem::serializeFrom( QDataStream& s )
439 odebug << "loading OListViewItem..." << oendl; 439 odebug << "loading OListViewItem..." << oendl;
440 440
441 for ( int i = 0; i < listView()->columns(); ++i ) 441 for ( int i = 0; i < listView()->columns(); ++i )
442 { 442 {
443 QString coltext; 443 QString coltext;
444 s >> coltext; 444 s >> coltext;
445 qDebug( "read text '%s' for column %d", (const char*) coltext, i ); 445 odebug << "read text '" << coltext << "' for column " << i << "" << oendl;
446 setText( i, coltext ); 446 setText( i, coltext );
447 } 447 }
448 448
449 int items; 449 int items;
450 s >> items; 450 s >> items;
451 qDebug( "read number of items = %d", items ); 451 odebug << "read number of items = " << items << "" << oendl;
452 452
453 for ( int i = 0; i < items; ++i ) 453 for ( int i = 0; i < items; ++i )
454 { 454 {
455 OListViewItem* item = childFactory(); 455 OListViewItem* item = childFactory();
456 s >> (*item); 456 s >> (*item);
457 } 457 }
@@ -612,13 +612,13 @@ ONamedListView::~ONamedListView()
612 612
613 613
614void ONamedListView::addColumns( const QStringList& columns ) 614void ONamedListView::addColumns( const QStringList& columns )
615{ 615{
616 for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it ) 616 for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it )
617 { 617 {
618 qDebug( "adding column %s", (const char*) *it ); 618 odebug << "adding column " << *it << "" << oendl;
619 addColumn( *it ); 619 addColumn( *it );
620 } 620 }
621} 621}
622 622
623 623
624int ONamedListView::findColumn( const QString& text ) const 624int ONamedListView::findColumn( const QString& text ) const
@@ -641,17 +641,17 @@ ONamedListViewItem* ONamedListView::find( int column, const QString& text, int r
641 641
642ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const 642ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const
643{ 643{
644 ONamedListViewItem* result; 644 ONamedListViewItem* result;
645 while ( item && item->text( column ) != text ) 645 while ( item && item->text( column ) != text )
646 { 646 {
647 qDebug( "checked %s", (const char*) item->text( column ) ); 647 odebug << "checked " << item->text( column ) << "" << oendl;
648 648
649 if ( recurse < 0 || recurse > 0 ) 649 if ( recurse < 0 || recurse > 0 )
650 { 650 {
651 qDebug( "recursion is %d - recursing into...", recurse ); 651 odebug << "recursion is " << recurse << " - recursing into..." << oendl;
652 result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 ); 652 result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 );
653 if ( result ) return result; 653 if ( result ) return result;
654 } 654 }
655 655
656 656
657 item = (ONamedListViewItem*) item->itemBelow(); 657 item = (ONamedListViewItem*) item->itemBelow();
@@ -722,13 +722,13 @@ ONamedListViewItem::~ONamedListViewItem()
722 722
723void ONamedListViewItem::setText( const QStringList& texts ) 723void ONamedListViewItem::setText( const QStringList& texts )
724{ 724{
725 int col = 0; 725 int col = 0;
726 for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it ) 726 for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it )
727 { 727 {
728 qDebug( "setting column %d = text %s", col, (const char*) *it ); 728 odebug << "setting column " << col << " = text " << *it << "" << oendl;
729 OListViewItem::setText( col++, *it ); 729 OListViewItem::setText( col++, *it );
730 } 730 }
731 731
732} 732}
733 733
734 734
@@ -738,13 +738,13 @@ void ONamedListViewItem::setText( const QString& column, const QString& text )
738 //FIXME: because of the linear search over all column texts. 738 //FIXME: because of the linear search over all column texts.
739 //FIXME: I will optimize later by using a hash map. 739 //FIXME: I will optimize later by using a hash map.
740 int col = ( (ONamedListView*) listView() )->findColumn( column ); 740 int col = ( (ONamedListView*) listView() )->findColumn( column );
741 if ( col != -1 ) 741 if ( col != -1 )
742 OListViewItem::setText( col, text ); 742 OListViewItem::setText( col, text );
743 else 743 else
744 qWarning( "ONamedListViewItem::setText(): Warning! Columntext '%s' not found.", (const char*) column ); 744 owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl;
745} 745}
746 746
747 747
748ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const 748ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const
749{ 749{
750 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse ); 750 return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse );
diff --git a/libopie2/opieui/opopupmenu.cpp b/libopie2/opieui/opopupmenu.cpp
index 3ab8490..50c613f 100644
--- a/libopie2/opieui/opopupmenu.cpp
+++ b/libopie2/opieui/opopupmenu.cpp
@@ -14,21 +14,21 @@
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20/* QT */ 20/* OPIE */
21#include <opie2/opopupmenu.h>
22#include <opie2/oconfig.h>
23#include <opie2/odebug.h>
21 24
25/* QT */
22#include <qdrawutil.h> 26#include <qdrawutil.h>
23#include <qtimer.h> 27#include <qtimer.h>
24 28
25/* OPIE */
26
27#include <opie2/opopupmenu.h>
28#include <opie2/oconfig.h>
29 29
30using namespace Opie::Core; 30using namespace Opie::Core;
31using namespace Opie::Ui; 31using namespace Opie::Ui;
32 32
33OPopupTitle::OPopupTitle(QWidget *parent, const char *name) 33OPopupTitle::OPopupTitle(QWidget *parent, const char *name)
34 : QWidget(parent, name) 34 : QWidget(parent, name)
@@ -129,13 +129,13 @@ public:
129 : noMatches(false) 129 : noMatches(false)
130 , shortcuts(false) 130 , shortcuts(false)
131 , autoExec(false) 131 , autoExec(false)
132 , lastHitIndex(-1) 132 , lastHitIndex(-1)
133 , m_ctxMenu(0) 133 , m_ctxMenu(0)
134 {} 134 {}
135 135
136 ~OPopupMenuPrivate () 136 ~OPopupMenuPrivate ()
137 { 137 {
138 delete m_ctxMenu; 138 delete m_ctxMenu;
139 } 139 }
140 140
141 QString m_lastTitle; 141 QString m_lastTitle;
@@ -175,13 +175,13 @@ OPopupMenu::~OPopupMenu()
175{ 175{
176 if (OPopupMenuPrivate::s_contextedMenu == this) 176 if (OPopupMenuPrivate::s_contextedMenu == this)
177 { 177 {
178 OPopupMenuPrivate::s_contextedMenu = 0; 178 OPopupMenuPrivate::s_contextedMenu = 0;
179 OPopupMenuPrivate::s_highlightedItem = -1; 179 OPopupMenuPrivate::s_highlightedItem = -1;
180 } 180 }
181 181
182 delete d; 182 delete d;
183} 183}
184 184
185int OPopupMenu::insertTitle(const QString &text, int id, int index) 185int OPopupMenu::insertTitle(const QString &text, int id, int index)
186{ 186{
187 OPopupTitle *titleItem = new OPopupTitle(); 187 OPopupTitle *titleItem = new OPopupTitle();
@@ -206,65 +206,65 @@ void OPopupMenu::changeTitle(int id, const QString &text)
206 QMenuItem *item = findItem(id); 206 QMenuItem *item = findItem(id);
207 if(item){ 207 if(item){
208 if(item->widget()) 208 if(item->widget())
209 ((OPopupTitle *)item->widget())->setTitle(text); 209 ((OPopupTitle *)item->widget())->setTitle(text);
210#ifndef NDEBUG 210#ifndef NDEBUG
211 else 211 else
212 qWarning( "KPopupMenu: changeTitle() called with non-title id %d", id ); 212 owarn << "KPopupMenu: changeTitle() called with non-title id " << id << "" << oendl;
213#endif 213#endif
214 } 214 }
215#ifndef NDEBUG 215#ifndef NDEBUG
216 else 216 else
217 qWarning( "KPopupMenu: changeTitle() called with invalid id %d", id ); 217 owarn << "KPopupMenu: changeTitle() called with invalid id " << id << "" << oendl;
218#endif 218#endif
219} 219}
220 220
221void OPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text) 221void OPopupMenu::changeTitle(int id, const QPixmap &icon, const QString &text)
222{ 222{
223 QMenuItem *item = findItem(id); 223 QMenuItem *item = findItem(id);
224 if(item){ 224 if(item){
225 if(item->widget()) 225 if(item->widget())
226 ((OPopupTitle *)item->widget())->setTitle(text, &icon); 226 ((OPopupTitle *)item->widget())->setTitle(text, &icon);
227#ifndef NDEBUG 227#ifndef NDEBUG
228 else 228 else
229 qWarning( "KPopupMenu: changeTitle() called with non-title id %d", id ); 229 owarn << "KPopupMenu: changeTitle() called with non-title id " << id << "" << oendl;
230#endif 230#endif
231 } 231 }
232#ifndef NDEBUG 232#ifndef NDEBUG
233 else 233 else
234 qWarning( "KPopupMenu: changeTitle() called with invalid id %d", id ); 234 owarn << "KPopupMenu: changeTitle() called with invalid id " << id << "" << oendl;
235#endif 235#endif
236} 236}
237 237
238QString OPopupMenu::title(int id) const 238QString OPopupMenu::title(int id) const
239{ 239{
240 if(id == -1) // obsolete 240 if(id == -1) // obsolete
241 return(d->m_lastTitle); 241 return(d->m_lastTitle);
242 QMenuItem *item = findItem(id); 242 QMenuItem *item = findItem(id);
243 if(item){ 243 if(item){
244 if(item->widget()) 244 if(item->widget())
245 return(((OPopupTitle *)item->widget())->title()); 245 return(((OPopupTitle *)item->widget())->title());
246 else 246 else
247 qWarning("OPopupMenu: title() called with non-title id %d.", id); 247 owarn << "OPopupMenu: title() called with non-title id " << id << "." << oendl;
248 } 248 }
249 else 249 else
250 qWarning("OPopupMenu: title() called with invalid id %d.", id); 250 owarn << "OPopupMenu: title() called with invalid id " << id << "." << oendl;
251 return(QString::null); 251 return(QString::null);
252} 252}
253 253
254QPixmap OPopupMenu::titlePixmap(int id) const 254QPixmap OPopupMenu::titlePixmap(int id) const
255{ 255{
256 QMenuItem *item = findItem(id); 256 QMenuItem *item = findItem(id);
257 if(item){ 257 if(item){
258 if(item->widget()) 258 if(item->widget())
259 return(((OPopupTitle *)item->widget())->icon()); 259 return(((OPopupTitle *)item->widget())->icon());
260 else 260 else
261 qWarning("KPopupMenu: titlePixmap() called with non-title id %d.", id); 261 owarn << "KPopupMenu: titlePixmap() called with non-title id " << id << "." << oendl;
262 } 262 }
263 else 263 else
264 qWarning("KPopupMenu: titlePixmap() called with invalid id %d.", id); 264 owarn << "KPopupMenu: titlePixmap() called with invalid id " << id << "." << oendl;
265 QPixmap tmp; 265 QPixmap tmp;
266 return(tmp); 266 return(tmp);
267} 267}
268 268
269/** 269/**
270 * This is re-implemented for keyboard navigation. 270 * This is re-implemented for keyboard navigation.
diff --git a/libopie2/opieui/otaskbarapplet.h b/libopie2/opieui/otaskbarapplet.h
index 77cc461..75c07d1 100644
--- a/libopie2/opieui/otaskbarapplet.h
+++ b/libopie2/opieui/otaskbarapplet.h
@@ -29,15 +29,19 @@
29 29
30*/ 30*/
31 31
32#ifndef OTASKBARAPPLET_H 32#ifndef OTASKBARAPPLET_H
33#define OTASKBARAPPLET_H 33#define OTASKBARAPPLET_H
34 34
35/* OPIE */
36#include <opie2/odebug.h>
37
35#include <qpe/taskbarappletinterface.h> 38#include <qpe/taskbarappletinterface.h>
36#include <qpe/qcom.h> 39#include <qpe/qcom.h>
37 40
41/* QT */
38#include <qwidget.h> 42#include <qwidget.h>
39 43
40class QMouseEvent; 44class QMouseEvent;
41 45
42namespace Opie { 46namespace Opie {
43namespace Ui { 47namespace Ui {
@@ -58,20 +62,20 @@ template<class T> class OTaskbarAppletWrapper : public TaskbarAppletInterface
58 { 62 {
59 delete _applet; 63 delete _applet;
60 } 64 }
61 65
62 QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) 66 QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface )
63 { 67 {
64 qDebug( "OTaskbarAppletWrapper::queryInterface()" ); 68 odebug << "OTaskbarAppletWrapper::queryInterface()" << oendl;
65 *iface = 0; 69 *iface = 0;
66 if ( uuid == IID_QUnknown ) 70 if ( uuid == IID_QUnknown )
67 *iface = this; 71 *iface = this;
68 else if ( uuid == IID_TaskbarApplet ) 72 else if ( uuid == IID_TaskbarApplet )
69 *iface = this; 73 *iface = this;
70 else 74 else
71 return QS_FALSE; 75 return QS_FALSE;
72 76
73 if ( *iface ) (*iface)->addRef(); 77 if ( *iface ) (*iface)->addRef();
74 return QS_OK; 78 return QS_OK;
75 } 79 }
76 80
77 Q_REFCOUNT 81 Q_REFCOUNT
diff --git a/libqtaux/oticker.cpp b/libqtaux/oticker.cpp
index e954cc8..29478fd 100644
--- a/libqtaux/oticker.cpp
+++ b/libqtaux/oticker.cpp
@@ -28,12 +28,14 @@
28 28
29*/ 29*/
30 30
31#include "oticker.h" 31#include "oticker.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odebug.h>
35
34#include <qpe/config.h> 36#include <qpe/config.h>
35 37
36using namespace Opie::Ui; 38using namespace Opie::Ui;
37 39
38OTicker::OTicker( QWidget* parent ) 40OTicker::OTicker( QWidget* parent )
39 : QLabel( parent ) 41 : QLabel( parent )
@@ -69,20 +71,20 @@ void OTicker::setFrame( int frameStyle )
69} 71}
70 72
71void OTicker::setText( const QString& text ) 73void OTicker::setText( const QString& text )
72{ 74{
73 pos = 0; // reset it everytime the text is changed 75 pos = 0; // reset it everytime the text is changed
74 scrollText = text; 76 scrollText = text;
75 qDebug( scrollText ); 77 odebug << scrollText << oendl;
76 78
77 int pixelLen = 0; 79 int pixelLen = 0;
78 bool bigger = false; 80 bool bigger = false;
79 int contWidth = contentsRect().width(); 81 int contWidth = contentsRect().width();
80 int contHeight = contentsRect().height(); 82 int contHeight = contentsRect().height();
81 int pixelTextLen = fontMetrics().width( text ); 83 int pixelTextLen = fontMetrics().width( text );
82 qDebug( "<<<<<<<height %d, width %d, text width %d %d\n", contHeight, contWidth, pixelTextLen, scrollText.length() ); 84 odebug << "<<<<<<<height " << contHeight << ", width " << contWidth << ", text width " << pixelTextLen << " " << scrollText.length() << "\n" << oendl;
83 if ( pixelTextLen < contWidth ) 85 if ( pixelTextLen < contWidth )
84 { 86 {
85 pixelLen = contWidth; 87 pixelLen = contWidth;
86 } 88 }
87 else 89 else
88 { 90 {
@@ -97,13 +99,13 @@ void OTicker::setText( const QString& text )
97 pmp.setPen( foregroundcolor ); 99 pmp.setPen( foregroundcolor );
98 pmp.drawText( 0, 0, pixelTextLen, contHeight, AlignVCenter, scrollText ); 100 pmp.drawText( 0, 0, pixelTextLen, contHeight, AlignVCenter, scrollText );
99 pmp.end(); 101 pmp.end();
100 scrollTextPixmap = pm; 102 scrollTextPixmap = pm;
101 103
102 killTimers(); 104 killTimers();
103 // qDebug("Scrollupdate %d", updateTimerTime); 105 // odebug << "Scrollupdate " << updateTimerTime << "" << oendl;
104 if ( bigger /*pixelTextLen > contWidth*/ ) 106 if ( bigger /*pixelTextLen > contWidth*/ )
105 startTimer( updateTimerTime ); 107 startTimer( updateTimerTime );
106 update(); 108 update();
107} 109}
108 110
109 111
@@ -120,13 +122,13 @@ void OTicker::drawContents( QPainter *p )
120 if ( pixelLen > contentsRect().width() ) // Scrolling 122 if ( pixelLen > contentsRect().width() ) // Scrolling
121 p->drawPixmap( pos - pixelLen, contentsRect().y(), scrollTextPixmap ); 123 p->drawPixmap( pos - pixelLen, contentsRect().y(), scrollTextPixmap );
122} 124}
123 125
124void OTicker::mouseReleaseEvent( QMouseEvent * ) 126void OTicker::mouseReleaseEvent( QMouseEvent * )
125{ 127{
126 // qDebug("<<<<<<<>>>>>>>>>"); 128 // odebug << "<<<<<<<>>>>>>>>>" << oendl;
127 emit mousePressed(); 129 emit mousePressed();
128} 130}
129 131
130void OTicker::setUpdateTime( int time ) 132void OTicker::setUpdateTime( int time )
131{ 133{
132 updateTimerTime = time; 134 updateTimerTime = time;