From 08e6e3d01bc56d3b55c1512164f48d3db762bd53 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 14:59:16 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- libk3b/tools/k3blistview.cpp | 40 ++++++++++++++++++++-------------------- libk3b/tools/k3blistview.h | 8 ++++---- libk3b/tools/k3bpushbutton.h | 4 ++-- libk3b/tools/k3bradioaction.cpp | 32 ++++++++++++++++---------------- libk3b/tools/k3bradioaction.h | 18 +++++++++--------- libk3b/tools/k3btoolbox.cpp | 10 +++++----- libk3b/tools/k3btoolbox.h | 10 +++++----- libk3b/tools/k3btoolbutton.h | 2 +- 8 files changed, 62 insertions(+), 62 deletions(-) (limited to 'libk3b/tools') diff --git a/libk3b/tools/k3blistview.cpp b/libk3b/tools/k3blistview.cpp index 048f2ee..552c218 100644 --- a/libk3b/tools/k3blistview.cpp +++ b/libk3b/tools/k3blistview.cpp @@ -98,25 +98,25 @@ public: K3bListViewItem::K3bListViewItem(TQListView *parent) - : KListViewItem( parent ) + : TDEListViewItem( parent ) { init(); } K3bListViewItem::K3bListViewItem(TQListViewItem *parent) - : KListViewItem( parent ) + : TDEListViewItem( parent ) { init(); } K3bListViewItem::K3bListViewItem(TQListView *parent, TQListViewItem *after) - : KListViewItem( parent, after ) + : TDEListViewItem( parent, after ) { init(); } K3bListViewItem::K3bListViewItem(TQListViewItem *parent, TQListViewItem *after) - : KListViewItem( parent, after ) + : TDEListViewItem( parent, after ) { init(); } @@ -127,7 +127,7 @@ K3bListViewItem::K3bListViewItem(TQListView *parent, const TQString& s3, const TQString& s4, const TQString& s5, const TQString& s6, const TQString& s7, const TQString& s8) - : KListViewItem( parent, s1, s2, s3, s4, s5, s6, s7, s8 ) + : TDEListViewItem( parent, s1, s2, s3, s4, s5, s6, s7, s8 ) { init(); } @@ -138,7 +138,7 @@ K3bListViewItem::K3bListViewItem(TQListViewItem *parent, const TQString& s3, const TQString& s4, const TQString& s5, const TQString& s6, const TQString& s7, const TQString& s8) - : KListViewItem( parent, s1, s2, s3, s4, s5, s6, s7, s8 ) + : TDEListViewItem( parent, s1, s2, s3, s4, s5, s6, s7, s8 ) { init(); } @@ -149,7 +149,7 @@ K3bListViewItem::K3bListViewItem(TQListView *parent, TQListViewItem *after, const TQString& s3, const TQString& s4, const TQString& s5, const TQString& s6, const TQString& s7, const TQString& s8) - : KListViewItem( parent, after, s1, s2, s3, s4, s5, s6, s7, s8 ) + : TDEListViewItem( parent, after, s1, s2, s3, s4, s5, s6, s7, s8 ) { init(); } @@ -160,7 +160,7 @@ K3bListViewItem::K3bListViewItem(TQListViewItem *parent, TQListViewItem *after, const TQString& s3, const TQString& s4, const TQString& s5, const TQString& s6, const TQString& s7, const TQString& s8) - : KListViewItem( parent, after, s1, s2, s3, s4, s5, s6, s7, s8 ) + : TDEListViewItem( parent, after, s1, s2, s3, s4, s5, s6, s7, s8 ) { init(); } @@ -186,7 +186,7 @@ void K3bListViewItem::init() int K3bListViewItem::width( const TQFontMetrics& fm, const TQListView* lv, int c ) const { - return KListViewItem::width( fm, lv, c ) + getColumnInfo(c)->margin*2; + return TDEListViewItem::width( fm, lv, c ) + getColumnInfo(c)->margin*2; } @@ -343,7 +343,7 @@ int K3bListViewItem::marginVertical() const void K3bListViewItem::setup() { - KListViewItem::setup(); + TDEListViewItem::setup(); setHeight( height() + 2*m_vMargin ); } @@ -374,7 +374,7 @@ void K3bListViewItem::paintCell( TQPainter* p, const TQColorGroup& cg, int col, p->fillRect( width-info->margin, 0, info->margin, height(), cgh.brush( TQColorGroup::Highlight ) ); } - else { // in case we use the KListView alternate color stuff + else { // in case we use the TDEListView alternate color stuff p->fillRect( 0, 0, info->margin, height(), cgh.brush( TQColorGroup::Base ) ); p->fillRect( width-info->margin, 0, info->margin, height(), @@ -546,7 +546,7 @@ public: K3bListView::K3bListView( TQWidget* parent, const char* name ) - : KListView( parent, name ), + : TDEListView( parent, name ), m_noItemVMargin( 20 ), m_noItemHMargin( 20 ) { @@ -592,7 +592,7 @@ TQWidget* K3bListView::editor( K3bListViewItem::EditorType t ) const void K3bListView::clear() { hideEditor(); - KListView::clear(); + TDEListView::clear(); } @@ -806,7 +806,7 @@ void K3bListView::setCurrentItem( TQListViewItem* i ) // doRename(); // hideEditor(); // m_currentEditItem = 0; - KListView::setCurrentItem( i ); + TDEListView::setCurrentItem( i ); } @@ -819,14 +819,14 @@ void K3bListView::setNoItemText( const TQString& text ) void K3bListView::viewportPaintEvent( TQPaintEvent* e ) { - KListView::viewportPaintEvent( e ); + TDEListView::viewportPaintEvent( e ); } // FIXME: move this to viewportPaintEvent void K3bListView::drawContentsOffset( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch ) { - KListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch ); + TDEListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch ); if( childCount() == 0 && !m_noItemText.isEmpty()) { @@ -846,7 +846,7 @@ void K3bListView::drawContentsOffset( TQPainter * p, int ox, int oy, int cx, int void K3bListView::paintEmptyArea( TQPainter* p, const TQRect& rect ) { - KListView::paintEmptyArea( p, rect ); + TDEListView::paintEmptyArea( p, rect ); // if( childCount() == 0 && !m_noItemText.isEmpty()) { @@ -869,7 +869,7 @@ void K3bListView::paintEmptyArea( TQPainter* p, const TQRect& rect ) void K3bListView::resizeEvent( TQResizeEvent* e ) { - KListView::resizeEvent( e ); + TDEListView::resizeEvent( e ); updateEditorSize(); } @@ -1150,7 +1150,7 @@ bool K3bListView::eventFilter( TQObject* o, TQEvent* e ) } } - return KListView::eventFilter( o, e ); + return TDEListView::eventFilter( o, e ); } @@ -1202,7 +1202,7 @@ void K3bListView::viewportResizeEvent( TQResizeEvent* e ) viewport()->setPaletteBackgroundPixmap( bgPix ); } - KListView::viewportResizeEvent( e ); + TDEListView::viewportResizeEvent( e ); } diff --git a/libk3b/tools/k3blistview.h b/libk3b/tools/k3blistview.h index 6c5727e..333b9f0 100644 --- a/libk3b/tools/k3blistview.h +++ b/libk3b/tools/k3blistview.h @@ -39,7 +39,7 @@ class K3bMsfEdit; class K3bListView; -class LIBK3B_EXPORT K3bListViewItem : public KListViewItem +class LIBK3B_EXPORT K3bListViewItem : public TDEListViewItem { public: K3bListViewItem(TQListView *parent); @@ -74,7 +74,7 @@ class LIBK3B_EXPORT K3bListViewItem : public KListViewItem virtual ~K3bListViewItem(); /** - * reimplemented from KListViewItem + * reimplemented from TDEListViewItem */ void setup(); @@ -153,7 +153,7 @@ class LIBK3B_EXPORT K3bCheckListViewItem : public K3bListViewItem -class LIBK3B_EXPORT K3bListView : public KListView +class LIBK3B_EXPORT K3bListView : public TDEListView { friend class K3bListViewItem; @@ -234,7 +234,7 @@ class LIBK3B_EXPORT K3bListView : public KListView protected: /** - * calls KListView::drawContentsOffset + * calls TDEListView::drawContentsOffset * and paints a the noItemText if no item is in the list */ virtual void drawContentsOffset ( TQPainter * p, int ox, int oy, int cx, int cy, int cw, int ch ); diff --git a/libk3b/tools/k3bpushbutton.h b/libk3b/tools/k3bpushbutton.h index dc130f3..13a8fec 100644 --- a/libk3b/tools/k3bpushbutton.h +++ b/libk3b/tools/k3bpushbutton.h @@ -21,7 +21,7 @@ #include "k3b_export.h" /** - * A pushbutton with delayed popu pmenu support just like the KToolBarButton + * A pushbutton with delayed popu pmenu support just like the TDEToolBarButton */ class LIBK3B_EXPORT K3bPushButton : public KPushButton { @@ -58,7 +58,7 @@ class LIBK3B_EXPORT K3bPushButton : public KPushButton /** * The popup menu will show if the button is pressed down for about half a second - * or if the mouse is moved while pressed just like the KToolBarButton. + * or if the mouse is moved while pressed just like the TDEToolBarButton. */ void setDelayedPopupMenu( TQPopupMenu* ); diff --git a/libk3b/tools/k3bradioaction.cpp b/libk3b/tools/k3bradioaction.cpp index 4293322..a70b5be 100644 --- a/libk3b/tools/k3bradioaction.cpp +++ b/libk3b/tools/k3bradioaction.cpp @@ -17,57 +17,57 @@ #include -K3bRadioAction::K3bRadioAction( const TQString& text, const KShortcut& cut, +K3bRadioAction::K3bRadioAction( const TQString& text, const TDEShortcut& cut, TQObject* parent, const char* name ) - : KToggleAction( text, cut, parent, name ), + : TDEToggleAction( text, cut, parent, name ), m_alwaysEmit(false) { } -K3bRadioAction::K3bRadioAction( const TQString& text, const KShortcut& cut, +K3bRadioAction::K3bRadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KToggleAction( text, cut, receiver, slot, parent, name ), + : TDEToggleAction( text, cut, receiver, slot, parent, name ), m_alwaysEmit(false) { } K3bRadioAction::K3bRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KToggleAction( text, pix, cut, parent, name ), + : TDEToggleAction( text, pix, cut, parent, name ), m_alwaysEmit(false) { } K3bRadioAction::K3bRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, TQObject* parent, const char* name ) - : KToggleAction( text, pix, cut, parent, name ), + : TDEToggleAction( text, pix, cut, parent, name ), m_alwaysEmit(false) { } K3bRadioAction::K3bRadioAction( const TQString& text, const TQIconSet& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KToggleAction( text, pix, cut, receiver, slot, parent, name ), + : TDEToggleAction( text, pix, cut, receiver, slot, parent, name ), m_alwaysEmit(false) { } K3bRadioAction::K3bRadioAction( const TQString& text, const TQString& pix, - const KShortcut& cut, + const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) - : KToggleAction( text, pix, cut, receiver, slot, parent, name ), + : TDEToggleAction( text, pix, cut, receiver, slot, parent, name ), m_alwaysEmit(false) { } K3bRadioAction::K3bRadioAction( TQObject* parent, const char* name ) - : KToggleAction( parent, name ), + : TDEToggleAction( parent, name ), m_alwaysEmit(false) { } @@ -80,15 +80,15 @@ void K3bRadioAction::slotActivated() const TQObject *senderObj = TQT_TQOBJECT_CONST(const_cast(sender())); - if ( !senderObj || !::tqqt_cast( senderObj ) ) + if ( !senderObj || !::tqqt_cast( senderObj ) ) return; - const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast( static_cast( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); return; } - KToggleAction::slotActivated(); + TDEToggleAction::slotActivated(); } #include "k3bradioaction.moc" diff --git a/libk3b/tools/k3bradioaction.h b/libk3b/tools/k3bradioaction.h index 2613b7f..cf77f88 100644 --- a/libk3b/tools/k3bradioaction.h +++ b/libk3b/tools/k3bradioaction.h @@ -20,13 +20,13 @@ #include "k3b_export.h" /** - * This differs from KRadioAction only in the boolean + * This differs from TDERadioAction only in the boolean * flag which says if it should always emit the signals * even if it was checked twice. * * Docu copied from tdelibs */ -class LIBK3B_EXPORT K3bRadioAction : public KToggleAction +class LIBK3B_EXPORT K3bRadioAction : public TDEToggleAction { Q_OBJECT @@ -42,7 +42,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const KShortcut& cut = KShortcut(), TQObject* parent = 0, const char* name = 0 ); + K3bRadioAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** * @param text The text that will be displayed. @@ -52,7 +52,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const KShortcut& cut, + K3bRadioAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -62,7 +62,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut = KShortcut(), + K3bRadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -72,7 +72,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut = KShortcut(), + K3bRadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 ); /** @@ -84,7 +84,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const TQIconSet& pix, const KShortcut& cut, + K3bRadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); /** @@ -96,7 +96,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction * @param parent This action's parent. * @param name An internal name for this action. */ - K3bRadioAction( const TQString& text, const TQString& pix, const KShortcut& cut, + K3bRadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut, const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); @@ -109,7 +109,7 @@ class LIBK3B_EXPORT K3bRadioAction : public KToggleAction /** * @param b if true the action will always emit the activated signal * even if the toggled state did not change. The default is false. - * which is the same behaviour as KRadioAction + * which is the same behaviour as TDERadioAction */ void setAlwaysEmitActivated( bool b ) { m_alwaysEmit = b; } diff --git a/libk3b/tools/k3btoolbox.cpp b/libk3b/tools/k3btoolbox.cpp index 58764be..22b7a94 100644 --- a/libk3b/tools/k3btoolbox.cpp +++ b/libk3b/tools/k3btoolbox.cpp @@ -77,7 +77,7 @@ void K3bToolBoxSeparator::paintEvent( TQPaintEvent* ) -K3bToolBoxButton::K3bToolBoxButton( KAction* action, TQWidget* parent ) +K3bToolBoxButton::K3bToolBoxButton( TDEAction* action, TQWidget* parent ) : TQToolButton( parent ), m_popupMenu(0) { @@ -94,7 +94,7 @@ K3bToolBoxButton::K3bToolBoxButton( KAction* action, TQWidget* parent ) else TQToolTip::add( this, action->toolTip() ); -// if( KToggleAction* ta = dynamic_cast( action ) ) { +// if( TDEToggleAction* ta = dynamic_cast( action ) ) { // setToggleButton( true ); // // initial state @@ -106,7 +106,7 @@ K3bToolBoxButton::K3bToolBoxButton( KAction* action, TQWidget* parent ) // } // else - if( KActionMenu* am = dynamic_cast( action ) ) { + if( TDEActionMenu* am = dynamic_cast( action ) ) { m_popupMenu = am->popupMenu(); connect( this, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotPopupActivated()) ); setPopup( m_popupMenu ); @@ -185,7 +185,7 @@ K3bToolBox::~K3bToolBox() } -K3bToolBoxButton* K3bToolBox::addButton( KAction* action, bool forceText ) +K3bToolBoxButton* K3bToolBox::addButton( TDEAction* action, bool forceText ) { if( action ) { K3bToolBoxButton* b = new K3bToolBoxButton( action, this ); @@ -266,7 +266,7 @@ void K3bToolBox::addWidget( TQWidget* w ) } -K3bToolBoxButton* K3bToolBox::addToggleButton( KToggleAction* action ) +K3bToolBoxButton* K3bToolBox::addToggleButton( TDEToggleAction* action ) { return addButton( action ); } diff --git a/libk3b/tools/k3btoolbox.h b/libk3b/tools/k3btoolbox.h index 09635aa..45621c1 100644 --- a/libk3b/tools/k3btoolbox.h +++ b/libk3b/tools/k3btoolbox.h @@ -22,8 +22,8 @@ #include #include "k3b_export.h" -class KAction; -class KToggleAction; +class TDEAction; +class TDEToggleAction; class KWidgetAction; class TQGridLayout; class TQPopupMenu; @@ -39,7 +39,7 @@ class LIBK3B_EXPORT K3bToolBoxButton : public TQToolButton public: - K3bToolBoxButton( KAction*, TQWidget* parent ); + K3bToolBoxButton( TDEAction*, TQWidget* parent ); K3bToolBoxButton( const TQString& text, const TQString& icon, const TQString& tooltip, const TQString& whatsthis, TQObject* receiver, const char* slot, @@ -69,8 +69,8 @@ class LIBK3B_EXPORT K3bToolBox : public TQFrame const TQString& tooltip = TQString(), const TQString& whatsthis = TQString(), TQObject* receiver = 0, const char* slot = 0, bool forceTextLabel = false ); - K3bToolBoxButton* addButton( KAction*, bool forceTextLabel = false ); - K3bToolBoxButton* addToggleButton( KToggleAction* ); + K3bToolBoxButton* addButton( TDEAction*, bool forceTextLabel = false ); + K3bToolBoxButton* addToggleButton( TDEToggleAction* ); void addWidgetAction( KWidgetAction* ); /** diff --git a/libk3b/tools/k3btoolbutton.h b/libk3b/tools/k3btoolbutton.h index 6b2057d..40655e4 100644 --- a/libk3b/tools/k3btoolbutton.h +++ b/libk3b/tools/k3btoolbutton.h @@ -27,7 +27,7 @@ class TQEvent; /** * the K3bToolButton is an enhanced TQToolButton which adds two functionalities: *
  • A delayed popup menu is shown immiadetely once the mouse is dragged downwards - * much like the KToolBarButton + * much like the TDEToolBarButton *
  • If a popup menu is set a little arrow indicates this. */ class LIBK3B_EXPORT K3bToolButton : public TQToolButton -- cgit v1.2.3