summaryrefslogtreecommitdiff
path: root/libopie2
Unidiff
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/qt3/opieui/ocombobox.cpp20
-rw-r--r--libopie2/qt3/opieui/ocompletionbox.cpp10
-rw-r--r--libopie2/qt3/opieui/ojanuswidget.cpp10
-rw-r--r--libopie2/qt3/opieui/olineedit.cpp24
4 files changed, 32 insertions, 32 deletions
diff --git a/libopie2/qt3/opieui/ocombobox.cpp b/libopie2/qt3/opieui/ocombobox.cpp
index 8dbda8f..bd330e0 100644
--- a/libopie2/qt3/opieui/ocombobox.cpp
+++ b/libopie2/qt3/opieui/ocombobox.cpp
@@ -325,26 +325,26 @@ void OComboBox::setLineEdit( OLineEdit *edit )
325 else 325 else
326 d->olineEdit = static_cast<OLineEdit*>( edit ); 326 d->olineEdit = static_cast<OLineEdit*>( edit );
327 setDelegate( d->olineEdit ); 327 setDelegate( d->olineEdit );
328 328
329 // forward some signals. We only emit returnPressed() ourselves. 329 // forward some signals. We only emit returnPressed() ourselves.
330 if ( d->olineEdit ) { 330 if ( d->olineEdit ) {
331 connect( d->olineEdit, SIGNAL( completion( const QString& )), 331 connect( d->olineEdit, SIGNAL( completion(const QString&)),
332 SIGNAL( completion( const QString& )) ); 332 SIGNAL( completion(const QString&)) );
333 connect( d->olineEdit, SIGNAL( substringCompletion( const QString& )), 333 connect( d->olineEdit, SIGNAL( substringCompletion(const QString&)),
334 SIGNAL( substringCompletion( const QString& )) ); 334 SIGNAL( substringCompletion(const QString&)) );
335 connect( d->olineEdit, 335 connect( d->olineEdit,
336 SIGNAL( textRotation( OCompletionBase::KeyBindingType )), 336 SIGNAL( textRotation(OCompletionBase::KeyBindingType)),
337 SIGNAL( textRotation( OCompletionBase::KeyBindingType )) ); 337 SIGNAL( textRotation(OCompletionBase::KeyBindingType)) );
338 connect( d->olineEdit, 338 connect( d->olineEdit,
339 SIGNAL( completionModeChanged( OGlobalSettings::Completion )), 339 SIGNAL( completionModeChanged(OGlobalSettings::Completion)),
340 SIGNAL( completionModeChanged( OGlobalSettings::Completion))); 340 SIGNAL( completionModeChanged(OGlobalSettings::Completion)));
341 341
342 connect( d->olineEdit, 342 connect( d->olineEdit,
343 SIGNAL( aboutToShowContextMenu( QPopupMenu * )), 343 SIGNAL( aboutToShowContextMenu(QPopupMenu*)),
344 SIGNAL( aboutToShowContextMenu( QPopupMenu * )) ); 344 SIGNAL( aboutToShowContextMenu(QPopupMenu*)) );
345 } 345 }
346 #else 346 #else
347 #warning OComboBox is not fully functional with Qt2 347 #warning OComboBox is not fully functional with Qt2
348 #endif 348 #endif
349} 349}
350 350
diff --git a/libopie2/qt3/opieui/ocompletionbox.cpp b/libopie2/qt3/opieui/ocompletionbox.cpp
index b594b8e..b36123e 100644
--- a/libopie2/qt3/opieui/ocompletionbox.cpp
+++ b/libopie2/qt3/opieui/ocompletionbox.cpp
@@ -64,20 +64,20 @@ OCompletionBox::OCompletionBox( QWidget *parent, const char *name )
64 else 64 else
65 setFocusPolicy( NoFocus ); 65 setFocusPolicy( NoFocus );
66 66
67 setVScrollBarMode( Auto ); 67 setVScrollBarMode( Auto );
68 setHScrollBarMode( AlwaysOff ); 68 setHScrollBarMode( AlwaysOff );
69 69
70 connect( this, SIGNAL( doubleClicked( QListBoxItem * )), 70 connect( this, SIGNAL( doubleClicked(QListBoxItem*)),
71 SLOT( slotActivated( QListBoxItem * )) ); 71 SLOT( slotActivated(QListBoxItem*)) );
72 72
73 // grmbl, just QListBox workarounds :[ Thanks Volker. 73 // grmbl, just QListBox workarounds :[ Thanks Volker.
74 connect( this, SIGNAL( currentChanged( QListBoxItem * )), 74 connect( this, SIGNAL( currentChanged(QListBoxItem*)),
75 SLOT( slotCurrentChanged() )); 75 SLOT( slotCurrentChanged() ));
76 connect( this, SIGNAL( clicked( QListBoxItem * )), 76 connect( this, SIGNAL( clicked(QListBoxItem*)),
77 SLOT( slotItemClicked( QListBoxItem * )) ); 77 SLOT( slotItemClicked(QListBoxItem*)) );
78} 78}
79 79
80OCompletionBox::~OCompletionBox() 80OCompletionBox::~OCompletionBox()
81{ 81{
82 d->m_parent = 0L; 82 d->m_parent = 0L;
83 delete d; 83 delete d;
diff --git a/libopie2/qt3/opieui/ojanuswidget.cpp b/libopie2/qt3/opieui/ojanuswidget.cpp
index 0a037ff..063e393 100644
--- a/libopie2/qt3/opieui/ojanuswidget.cpp
+++ b/libopie2/qt3/opieui/ojanuswidget.cpp
@@ -106,13 +106,13 @@ OJanusWidget::OJanusWidget( QWidget *parent, const char *name, int face )
106 mTreeList = new QListView( splitter ); 106 mTreeList = new QListView( splitter );
107 mTreeList->addColumn( QString::fromLatin1("") ); 107 mTreeList->addColumn( QString::fromLatin1("") );
108 mTreeList->header()->hide(); 108 mTreeList->header()->hide();
109 mTreeList->setRootIsDecorated(true); 109 mTreeList->setRootIsDecorated(true);
110 mTreeList->setSorting( -1 ); 110 mTreeList->setSorting( -1 );
111 connect( mTreeList, SIGNAL(selectionChanged()), SLOT(slotShowPage()) ); 111 connect( mTreeList, SIGNAL(selectionChanged()), SLOT(slotShowPage()) );
112 connect( mTreeList, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemClicked(QListViewItem *))); 112 connect( mTreeList, SIGNAL(clicked(QListViewItem*)), SLOT(slotItemClicked(QListViewItem*)));
113 113
114 // 114 //
115 // Page area. Title at top with a separator below and a pagestack using 115 // Page area. Title at top with a separator below and a pagestack using
116 // all available space at bottom. 116 // all available space at bottom.
117 // 117 //
118 QFrame *p = new QFrame( splitter ); 118 QFrame *p = new QFrame( splitter );
@@ -156,14 +156,14 @@ OJanusWidget::OJanusWidget( QWidget *parent, const char *name, int face )
156 156
157 mTitleSep = new OSeparator( page ); 157 mTitleSep = new OSeparator( page );
158 mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain ); 158 mTitleSep->setFrameStyle( QFrame::HLine|QFrame::Plain );
159 vbox->addWidget( mTitleSep ); 159 vbox->addWidget( mTitleSep );
160 160
161 mPageStack = new QWidgetStack( page ); 161 mPageStack = new QWidgetStack( page );
162 connect(mPageStack, SIGNAL(aboutToShow(QWidget *)), 162 connect(mPageStack, SIGNAL(aboutToShow(QWidget*)),
163 this, SIGNAL(aboutToShowPage(QWidget *))); 163 this, SIGNAL(aboutToShowPage(QWidget*)));
164 vbox->addWidget( mPageStack, 10 ); 164 vbox->addWidget( mPageStack, 10 );
165 } 165 }
166 else if( mFace == Tabbed ) 166 else if( mFace == Tabbed )
167 { 167 {
168 mPageList = new QPtrList<QWidget>; 168 mPageList = new QPtrList<QWidget>;
169 169
@@ -860,15 +860,15 @@ void OJanusWidget::setRootIsDecorated( bool state )
860 860
861void OJanusWidget::unfoldTreeList( bool persist ) 861void OJanusWidget::unfoldTreeList( bool persist )
862{ 862{
863 if( mFace == TreeList ) 863 if( mFace == TreeList )
864 { 864 {
865 if( persist ) 865 if( persist )
866 connect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); 866 connect( mTreeList, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( slotReopen(QListViewItem*) ) );
867 else 867 else
868 disconnect( mTreeList, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( slotReopen( QListViewItem * ) ) ); 868 disconnect( mTreeList, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( slotReopen(QListViewItem*) ) );
869 869
870 for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) 870 for( QListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() )
871 item->setOpen( true ); 871 item->setOpen( true );
872 } 872 }
873} 873}
874 874
diff --git a/libopie2/qt3/opieui/olineedit.cpp b/libopie2/qt3/opieui/olineedit.cpp
index 9cb0cff..6f66fc7 100644
--- a/libopie2/qt3/opieui/olineedit.cpp
+++ b/libopie2/qt3/opieui/olineedit.cpp
@@ -444,14 +444,14 @@ QPopupMenu *OLineEdit::createPopupMenu()
444 #endif 444 #endif
445 445
446 // completion object is present. 446 // completion object is present.
447 if ( compObj() ) 447 if ( compObj() )
448 { 448 {
449 QPopupMenu *subMenu = new QPopupMenu( popup ); 449 QPopupMenu *subMenu = new QPopupMenu( popup );
450 connect( subMenu, SIGNAL( activated( int ) ), 450 connect( subMenu, SIGNAL( activated(int) ),
451 this, SLOT( completionMenuActivated( int ) ) ); 451 this, SLOT( completionMenuActivated(int) ) );
452 452
453 popup->insertSeparator(); 453 popup->insertSeparator();
454 //popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"), 454 //popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"),
455 // subMenu ); 455 // subMenu );
456 456
457 popup->insertItem( tr("Text Completion"), subMenu ); 457 popup->insertItem( tr("Text Completion"), subMenu );
@@ -613,23 +613,23 @@ void OLineEdit::makeCompletionBox()
613 if ( d->completionBox ) 613 if ( d->completionBox )
614 return; 614 return;
615 615
616 d->completionBox = new OCompletionBox( this, "completion box" ); 616 d->completionBox = new OCompletionBox( this, "completion box" );
617 if ( handleSignals() ) 617 if ( handleSignals() )
618 { 618 {
619 connect( d->completionBox, SIGNAL(highlighted( const QString& )), 619 connect( d->completionBox, SIGNAL(highlighted(const QString&)),
620 SLOT(setText( const QString& )) ); 620 SLOT(setText(const QString&)) );
621 connect( d->completionBox, SIGNAL(userCancelled( const QString& )), 621 connect( d->completionBox, SIGNAL(userCancelled(const QString&)),
622 SLOT(setText( const QString& )) ); 622 SLOT(setText(const QString&)) );
623 623
624 // Nice lil' hacklet ;) KComboBox doesn't know when the completionbox 624 // Nice lil' hacklet ;) KComboBox doesn't know when the completionbox
625 // is created (childEvent() is even more hacky, IMHO), so we simply 625 // is created (childEvent() is even more hacky, IMHO), so we simply
626 // forward the completionbox' activated signal from here. 626 // forward the completionbox' activated signal from here.
627 if ( parentWidget() && parentWidget()->inherits("KComboBox") ) 627 if ( parentWidget() && parentWidget()->inherits("KComboBox") )
628 connect( d->completionBox, SIGNAL( activated( const QString& )), 628 connect( d->completionBox, SIGNAL( activated(const QString&)),
629 parentWidget(), SIGNAL( activated( const QString & ))); 629 parentWidget(), SIGNAL( activated(const QString&)));
630 } 630 }
631} 631}
632 632
633/*bool OLineEdit::overrideAccel (const QKeyEvent* e) 633/*bool OLineEdit::overrideAccel (const QKeyEvent* e)
634{ 634{
635 KShortcut scKey; 635 KShortcut scKey;
@@ -703,18 +703,18 @@ OCompletionBox * OLineEdit::completionBox( bool create )
703} 703}
704 704
705void OLineEdit::setCompletionObject( OCompletion* comp, bool hsig ) 705void OLineEdit::setCompletionObject( OCompletion* comp, bool hsig )
706{ 706{
707 OCompletion *oldComp = compObj(); 707 OCompletion *oldComp = compObj();
708 if ( oldComp && handleSignals() ) 708 if ( oldComp && handleSignals() )
709 disconnect( oldComp, SIGNAL( matches( const QStringList& )), 709 disconnect( oldComp, SIGNAL( matches(const QStringList&)),
710 this, SLOT( setCompletedItems( const QStringList& ))); 710 this, SLOT( setCompletedItems(const QStringList&)));
711 711
712 if ( comp && hsig ) 712 if ( comp && hsig )
713 connect( comp, SIGNAL( matches( const QStringList& )), 713 connect( comp, SIGNAL( matches(const QStringList&)),
714 this, SLOT( setCompletedItems( const QStringList& ))); 714 this, SLOT( setCompletedItems(const QStringList&)));
715 715
716 OCompletionBase::setCompletionObject( comp, hsig ); 716 OCompletionBase::setCompletionObject( comp, hsig );
717} 717}
718 718
719// QWidget::create() turns off mouse-Tracking which would break auto-hiding 719// QWidget::create() turns off mouse-Tracking which would break auto-hiding
720void OLineEdit::create( WId id, bool initializeWindow, bool destroyOldWindow ) 720void OLineEdit::create( WId id, bool initializeWindow, bool destroyOldWindow )