diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:14:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:14:36 -0600 |
commit | 7716a5e605907a009e19f429cec4e6b5f346bd71 (patch) | |
tree | 16cf4a5d7a24db774f988022d514adefc75015c0 /kbabel/commonui/kactionselector.cpp | |
parent | 0117fbed932653a04aeef16b2ed7edee858959ac (diff) | |
download | tdesdk-7716a5e605907a009e19f429cec4e6b5f346bd71.tar.gz tdesdk-7716a5e605907a009e19f429cec4e6b5f346bd71.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kbabel/commonui/kactionselector.cpp')
-rw-r--r-- | kbabel/commonui/kactionselector.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/kbabel/commonui/kactionselector.cpp b/kbabel/commonui/kactionselector.cpp index 9e5d3e79..c2638ff5 100644 --- a/kbabel/commonui/kactionselector.cpp +++ b/kbabel/commonui/kactionselector.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - KActionSelector.cpp + TDEActionSelector.cpp A widget for selecting and arranging actions/objects ------------------- begin : Mon June 3 2002 @@ -43,24 +43,24 @@ #include <tqwhatsthis.h> #include <tqapplication.h> -class KActionSelectorPrivate { +class TDEActionSelectorPrivate { public: TQListBox *availableListBox, *selectedListBox; TQToolButton *btnAdd, *btnRemove, *btnUp, *btnDown; TQLabel *lAvailable, *lSelected; bool moveOnDoubleClick, keyboardEnabled; - KActionSelector::ButtonIconSize iconSize; + TDEActionSelector::ButtonIconSize iconSize; TQString addIcon, removeIcon, upIcon, downIcon; - KActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; + TDEActionSelector::InsertionPolicy availableInsertionPolicy, selectedInsertionPolicy; bool showUpDownButtons; }; //BEGIN Constructor/destructor -KActionSelector::KActionSelector( TQWidget *parent, const char *name ) +TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ) { - d = new KActionSelectorPrivate(); + d = new TDEActionSelectorPrivate(); d->moveOnDoubleClick = true; d->keyboardEnabled = true; d->iconSize = SmallIcon; @@ -126,7 +126,7 @@ KActionSelector::KActionSelector( TQWidget *parent, const char *name ) d->selectedListBox->installEventFilter( this ); } -KActionSelector::~KActionSelector() +TDEActionSelector::~TDEActionSelector() { delete d; } @@ -135,17 +135,17 @@ KActionSelector::~KActionSelector() //BEGIN Public Methods -TQListBox *KActionSelector::availableListBox() +TQListBox *TDEActionSelector::availableListBox() { return d->availableListBox; } -TQListBox *KActionSelector::selectedListBox() +TQListBox *TDEActionSelector::selectedListBox() { return d->selectedListBox; } -void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) +void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) { int isz; if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small ); @@ -173,11 +173,11 @@ void KActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) d->btnDown->setIconSet( SmallIconSet( icon, isz ) ); break; default: - kdDebug(KBABEL)<<"KActionSelector::setButtonIcon: DAINBREAD!"<<endl; + kdDebug(KBABEL)<<"TDEActionSelector::setButtonIcon: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) +void TDEActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton button ) { switch ( button ) { @@ -194,11 +194,11 @@ void KActionSelector::setButtonIconSet( const TQIconSet &iconset, MoveButton but d->btnDown->setIconSet( iconset ); break; default: - kdDebug(KBABEL)<<"KActionSelector::setButtonIconSet: DAINBREAD!"<<endl; + kdDebug(KBABEL)<<"TDEActionSelector::setButtonIconSet: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) +void TDEActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) { switch ( button ) { @@ -215,11 +215,11 @@ void KActionSelector::setButtonTooltip( const TQString &tip, MoveButton button ) d->btnDown->setTextLabel( tip ); break; default: - kdDebug(KBABEL)<<"KActionSelector::setButtonToolTip: DAINBREAD!"<<endl; + kdDebug(KBABEL)<<"TDEActionSelector::setButtonToolTip: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) +void TDEActionSelector::setButtonWhatsThis( const TQString &text, MoveButton button ) { switch ( button ) { @@ -236,11 +236,11 @@ void KActionSelector::setButtonWhatsThis( const TQString &text, MoveButton butto TQWhatsThis::add( d->btnDown, text ); break; default: - kdDebug(KBABEL)<<"KActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; + kdDebug(KBABEL)<<"TDEActionSelector::setButtonWhatsThis: DAINBREAD!"<<endl; } } -void KActionSelector::setButtonsEnabled() +void TDEActionSelector::setButtonsEnabled() { d->btnAdd->setEnabled( d->availableListBox->currentItem() > -1 ); d->btnRemove->setEnabled( d->selectedListBox->currentItem() > -1 ); @@ -253,84 +253,84 @@ void KActionSelector::setButtonsEnabled() //BEGIN Properties -bool KActionSelector::moveOnDoubleClick() const +bool TDEActionSelector::moveOnDoubleClick() const { return d->moveOnDoubleClick; } -void KActionSelector::setMoveOnDoubleClick( bool b ) +void TDEActionSelector::setMoveOnDoubleClick( bool b ) { d->moveOnDoubleClick = b; } -bool KActionSelector::keyboardEnabled() const +bool TDEActionSelector::keyboardEnabled() const { return d->keyboardEnabled; } -void KActionSelector::setKeyboardEnabled( bool b ) +void TDEActionSelector::setKeyboardEnabled( bool b ) { d->keyboardEnabled = b; } -TQString KActionSelector::availableLabel() const +TQString TDEActionSelector::availableLabel() const { return d->lAvailable->text(); } -void KActionSelector::setAvailableLabel( const TQString &text ) +void TDEActionSelector::setAvailableLabel( const TQString &text ) { d->lAvailable->setText( text ); } -TQString KActionSelector::selectedLabel() const +TQString TDEActionSelector::selectedLabel() const { return d->lSelected->text(); } -void KActionSelector::setSelectedLabel( const TQString &text ) +void TDEActionSelector::setSelectedLabel( const TQString &text ) { d->lSelected->setText( text ); } -KActionSelector::ButtonIconSize KActionSelector::buttonIconSize() const +TDEActionSelector::ButtonIconSize TDEActionSelector::buttonIconSize() const { return d->iconSize; } -void KActionSelector::setButtonIconSize( ButtonIconSize size ) +void TDEActionSelector::setButtonIconSize( ButtonIconSize size ) { d->iconSize = size; // reload icons loadIcons(); } -KActionSelector::InsertionPolicy KActionSelector::availableInsertionPolicy() +TDEActionSelector::InsertionPolicy TDEActionSelector::availableInsertionPolicy() { return d->availableInsertionPolicy; } -void KActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setAvailableInsertionPolicy( InsertionPolicy p ) { d->availableInsertionPolicy = p; } -KActionSelector::InsertionPolicy KActionSelector::selectedInsertionPolicy() +TDEActionSelector::InsertionPolicy TDEActionSelector::selectedInsertionPolicy() { return d->selectedInsertionPolicy; } -void KActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) +void TDEActionSelector::setSelectedInsertionPolicy( InsertionPolicy p ) { d->selectedInsertionPolicy = p; } -bool KActionSelector::showUpDownButtons() +bool TDEActionSelector::showUpDownButtons() { return d->showUpDownButtons; } -void KActionSelector::setShowUpDownButtons( bool show ) +void TDEActionSelector::setShowUpDownButtons( bool show ) { d->showUpDownButtons = show; if ( show ) @@ -349,7 +349,7 @@ void KActionSelector::setShowUpDownButtons( bool show ) //BEGIN Public Slots -void KActionSelector::polish() +void TDEActionSelector::polish() { setButtonsEnabled(); } @@ -357,7 +357,7 @@ void KActionSelector::polish() //END Public Slots //BEGIN Protected -void KActionSelector::keyPressEvent( TQKeyEvent *e ) +void TDEActionSelector::keyPressEvent( TQKeyEvent *e ) { if ( ! d->keyboardEnabled ) return; if ( (e->state() & TQt::ControlButton) ) @@ -383,7 +383,7 @@ void KActionSelector::keyPressEvent( TQKeyEvent *e ) } } -bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) +bool TDEActionSelector::eventFilter( TQObject *o, TQEvent *e ) { if ( d->keyboardEnabled && e->type() == TQEvent::KeyPress ) { @@ -430,7 +430,7 @@ bool KActionSelector::eventFilter( TQObject *o, TQEvent *e ) //BEGIN Private Slots -void KActionSelector::buttonAddClicked() +void TDEActionSelector::buttonAddClicked() { // move all selected items from available to selected listbox TQListBoxItem *item = d->availableListBox->firstItem(); @@ -448,7 +448,7 @@ void KActionSelector::buttonAddClicked() d->selectedListBox->setFocus(); } -void KActionSelector::buttonRemoveClicked() +void TDEActionSelector::buttonRemoveClicked() { // move all selected items from selected to available listbox TQListBoxItem *item = d->selectedListBox->firstItem(); @@ -466,7 +466,7 @@ void KActionSelector::buttonRemoveClicked() d->availableListBox->setFocus(); } -void KActionSelector::buttonUpClicked() +void TDEActionSelector::buttonUpClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 ) return; @@ -477,7 +477,7 @@ void KActionSelector::buttonUpClicked() emit movedUp( item ); } -void KActionSelector::buttonDownClicked() +void TDEActionSelector::buttonDownClicked() { int c = d->selectedListBox->currentItem(); if ( c < 0 ) return; @@ -488,7 +488,7 @@ void KActionSelector::buttonDownClicked() emit movedDown( item ); } -void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) +void TDEActionSelector::itemDoubleClicked( TQListBoxItem *item ) { if ( d->moveOnDoubleClick ) moveItem( item ); @@ -498,7 +498,7 @@ void KActionSelector::itemDoubleClicked( TQListBoxItem *item ) //BEGIN Private Methods -void KActionSelector::loadIcons() +void TDEActionSelector::loadIcons() { int isz; if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small ); @@ -513,7 +513,7 @@ void KActionSelector::loadIcons() d->btnDown->setIconSet( SmallIconSet( d->downIcon, isz ) ); } -void KActionSelector::moveItem( TQListBoxItem *item ) +void TDEActionSelector::moveItem( TQListBoxItem *item ) { TQListBox *lbFrom = item->listBox(); TQListBox *lbTo; @@ -540,7 +540,7 @@ void KActionSelector::moveItem( TQListBoxItem *item ) emit removed( item ); } -int KActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) +int TDEActionSelector::insertionIndex( TQListBox *lb, InsertionPolicy policy ) { int index; switch ( policy ) |