diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:10:12 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:10:12 -0600 |
commit | 189e536f1a74ecc2d9dcf35b9f5b3d54a2d1901e (patch) | |
tree | 52d62ad83db1551dd15dc147b4af4cacaae6e850 /ksysv | |
parent | 58cb2c2c17b1e6dd48cbfbcb69ec2f50f1ced9ee (diff) | |
download | tdeadmin-189e536f1a74ecc2d9dcf35b9f5b3d54a2d1901e.tar.gz tdeadmin-189e536f1a74ecc2d9dcf35b9f5b3d54a2d1901e.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'ksysv')
-rw-r--r-- | ksysv/OldView.cpp | 24 | ||||
-rw-r--r-- | ksysv/OldView.h | 18 | ||||
-rw-r--r-- | ksysv/TopWidget.cpp | 26 | ||||
-rw-r--r-- | ksysv/TopWidget.h | 26 | ||||
-rw-r--r-- | ksysv/ksv_conf.cpp | 2 | ||||
-rw-r--r-- | ksysv/ksvdraglist.cpp | 16 | ||||
-rw-r--r-- | ksysv/ksvdraglist.h | 18 | ||||
-rw-r--r-- | ksysv/ksvlookandfeel.cpp | 4 |
8 files changed, 67 insertions, 67 deletions
diff --git a/ksysv/OldView.cpp b/ksysv/OldView.cpp index dbacbe6..2735861 100644 --- a/ksysv/OldView.cpp +++ b/ksysv/OldView.cpp @@ -72,7 +72,7 @@ #include "ActionList.h" #include "TopWidget.h" -KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const char* name) +KSVContent::KSVContent (TDEPopupMenu* openWithMenu, KSVTopLevel* parent, const char* name) : TQSplitter (Qt::Vertical, parent, name), startRL (new KSVDragList*[ksv::runlevelNumber]), stopRL (new KSVDragList*[ksv::runlevelNumber]), @@ -85,11 +85,11 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha setOpaqueResize( TDEGlobalSettings::opaqueResize() ); KXMLGUIFactory* factory = parent->factory(); - mItemMenu = static_cast<KPopupMenu*> (factory->container ("item_menu", parent)); + mItemMenu = static_cast<TDEPopupMenu*> (factory->container ("item_menu", parent)); mItemMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mContextMenu = static_cast<KPopupMenu*> (factory->container ("list_menu", parent)); + mContextMenu = static_cast<TDEPopupMenu*> (factory->container ("list_menu", parent)); mContextMenu->insertTitle (i18n ("Runlevel Menu"), -1, 0); - mScriptMenu = static_cast<KPopupMenu*> (factory->container ("script_menu", parent)); + mScriptMenu = static_cast<TDEPopupMenu*> (factory->container ("script_menu", parent)); mScriptMenu->insertTitle (i18n ("Services Menu"), -1, 0); mScroller = new KScroller (this); @@ -225,8 +225,8 @@ void KSVContent::initLList() this, TQT_SLOT (slotScriptProperties (TQListViewItem*))); // context menus - connect (scripts, TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), - this, TQT_SLOT (popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&))); + connect (scripts, TQT_SIGNAL (contextMenu (TDEListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupServicesMenu (TDEListView*, TQListViewItem*, const TQPoint&))); // for cut & copy connect (scripts, TQT_SIGNAL (newOrigin ()), @@ -332,10 +332,10 @@ void KSVContent::initLList() this, TQT_SLOT(slotDoubleClick(TQListViewItem*))); // context menus - connect (startRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), - this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&))); - connect (stopRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), - this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&))); + connect (startRL[i], TQT_SIGNAL (contextMenu (TDEListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupRunlevelMenu (TDEListView*, TQListViewItem*, const TQPoint&))); + connect (stopRL[i], TQT_SIGNAL (contextMenu (TDEListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupRunlevelMenu (TDEListView*, TQListViewItem*, const TQPoint&))); // cannot generate sorting number connect (startRL[i], TQT_SIGNAL(cannotGenerateNumber()), @@ -994,7 +994,7 @@ void KSVContent::showRunlevel (int index) calcMinSize(); } -void KSVContent::popupRunlevelMenu (KListView* list, TQListViewItem* i, const TQPoint& p) +void KSVContent::popupRunlevelMenu (TDEListView* list, TQListViewItem* i, const TQPoint& p) { if (i) mItemMenu->exec (p, 1); @@ -1005,7 +1005,7 @@ void KSVContent::popupRunlevelMenu (KListView* list, TQListViewItem* i, const TQ } } -void KSVContent::popupServicesMenu (KListView*, TQListViewItem* i, const TQPoint& p) +void KSVContent::popupServicesMenu (TDEListView*, TQListViewItem* i, const TQPoint& p) { if (i) { diff --git a/ksysv/OldView.h b/ksysv/OldView.h index c71b995..53eeb7a 100644 --- a/ksysv/OldView.h +++ b/ksysv/OldView.h @@ -33,9 +33,9 @@ class TQLayout; class KScroller; class TDEProcess; -class KListView; +class TDEListView; class TQSplitter; -class KPopupMenu; +class TDEPopupMenu; class KSVTrash; class KSVDragList; class KSVConfig; @@ -50,7 +50,7 @@ class KSVContent : public TQSplitter public: - KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent = 0, const char* name = 0); + KSVContent (TDEPopupMenu* openWithMenu, KSVTopLevel* parent = 0, const char* name = 0); ~KSVContent(); KSVDragList* getOrigin(); @@ -107,8 +107,8 @@ private slots: void fwdUndoAction(KSVAction*); void updatePanningFactor(); - void popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&); - void popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&); + void popupRunlevelMenu (TDEListView*, TQListViewItem*, const TQPoint&); + void popupServicesMenu (TDEListView*, TQListViewItem*, const TQPoint&); void updateServicesAfterChange (const TQString&); void updateRunlevelsAfterChange (); @@ -154,9 +154,9 @@ private: KSVDragList** stopRL; KSVDragList* scripts; - KPopupMenu* mItemMenu; - KPopupMenu* mContextMenu; - KPopupMenu* mScriptMenu; + TDEPopupMenu* mItemMenu; + TDEPopupMenu* mContextMenu; + TDEPopupMenu* mScriptMenu; KSVTrash* trash; TQTextEdit* textDisplay; KSVConfig* conf; @@ -171,7 +171,7 @@ private: TQSize mMinSize; - KPopupMenu* mOpenWithMenu; + TDEPopupMenu* mOpenWithMenu; TDETrader::OfferList mOpenWithOffers; TQCString m_buffer; diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp index 4724eb7..67f8404 100644 --- a/ksysv/TopWidget.cpp +++ b/ksysv/TopWidget.cpp @@ -95,7 +95,7 @@ namespace Status } // namespace Status KSVTopLevel::KSVTopLevel() - : KMainWindow(0, 0L, WStyle_ContextHelp|WDestructiveClose), + : TDEMainWindow(0, 0L, WStyle_ContextHelp|WDestructiveClose), mConfig(KSVConfig::self()), mView (0L), mPreferences (0L), @@ -208,7 +208,7 @@ void KSVTopLevel::initTools() void KSVTopLevel::initActions () { - KActionCollection* coll = actionCollection(); + TDEActionCollection* coll = actionCollection(); // setup File menu mFileRevert = KStdAction::revert (TQT_TQOBJECT(this), TQT_SLOT (slotClearChanges()), coll); @@ -247,15 +247,15 @@ void KSVTopLevel::initActions () mPasteAppend = KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT (pasteAppend()), coll, "ksysv_paste_append"); - mEditProperties = new KAction (i18n("P&roperties"), 0, + mEditProperties = new TDEAction (i18n("P&roperties"), 0, TQT_TQOBJECT(this), TQT_SLOT(properties()), coll, "ksysv_properties"); - mOpenDefault = new KAction (i18n ("&Open"), 0, + mOpenDefault = new TDEAction (i18n ("&Open"), 0, TQT_TQOBJECT(this), TQT_SLOT (editService()), coll, "ksysv_open_service"); - mOpenWith = new KActionMenu (i18n ("Open &With"), coll, "ksysv_open_with"); + mOpenWith = new TDEActionMenu (i18n ("Open &With"), coll, "ksysv_open_with"); // setup Settings menu createStandardStatusBarAction(); @@ -264,25 +264,25 @@ void KSVTopLevel::initActions () KStdAction::configureToolbars (TQT_TQOBJECT(this), TQT_SLOT(configureToolbars()), coll); KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveOptions()), coll); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowConfig()), coll); - mOptionsToggleLog = new KToggleAction (i18n("Show &Log"), "toggle_log", 0, + mOptionsToggleLog = new TDEToggleAction (i18n("Show &Log"), "toggle_log", 0, TQT_TQOBJECT(this), TQT_SLOT (toggleLog()), coll, "ksysv_toggle_log"); mOptionsToggleLog->setCheckedState(i18n("Hide &Log")); // setup Tools menu - mToolsStartService = new KToggleAction (i18n("&Start Service..."), "ksysv_start", 0, + mToolsStartService = new TDEToggleAction (i18n("&Start Service..."), "ksysv_start", 0, TQT_TQOBJECT(mStartDlg), TQT_SLOT (toggle()), coll, "ksysv_start_service"); - mToolsStopService = new KToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0, + mToolsStopService = new TDEToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0, TQT_TQOBJECT(mStopDlg), TQT_SLOT (toggle()), coll, "ksysv_stop_service"); - mToolsRestartService = new KToggleAction (i18n("&Restart Service..."), 0, + mToolsRestartService = new TDEToggleAction (i18n("&Restart Service..."), 0, TQT_TQOBJECT(mRestartDlg), TQT_SLOT (toggle()), coll, "ksysv_restart_service"); - mToolsEditService = new KToggleAction (i18n("&Edit Service..."), 0, + mToolsEditService = new TDEToggleAction (i18n("&Edit Service..."), 0, TQT_TQOBJECT(mEditDlg), TQT_SLOT (toggle()), coll, "ksysv_edit_service"); @@ -851,7 +851,7 @@ void KSVTopLevel::closeEvent (TQCloseEvent* e) return; } - KMainWindow::closeEvent (e); + TDEMainWindow::closeEvent (e); } void KSVTopLevel::dispatchEdit () @@ -957,10 +957,10 @@ void KSVTopLevel::setCaption (bool changed) setPlainCaption (kapp->makeStdCaption(KNetwork::KResolver::localHostName(), true, changed)); } -KActionCollection* KSVTopLevel::filteredActions () +TDEActionCollection* KSVTopLevel::filteredActions () { // remove unwanted (internal) actions - static KActionCollection coll = *actionCollection(); + static TDEActionCollection coll = *actionCollection(); static bool initialized = false; if (!initialized) diff --git a/ksysv/TopWidget.h b/ksysv/TopWidget.h index 8e5687b..2cf56b0 100644 --- a/ksysv/TopWidget.h +++ b/ksysv/TopWidget.h @@ -19,13 +19,13 @@ class TQCheckBox; -class KAction; -class KToggleAction; -class KActionMenu; +class TDEAction; +class TDEToggleAction; +class TDEActionMenu; class KMenuBar; class KStatusBar; -class KToolBar; -class KActionCollection; +class TDEToolBar; +class TDEActionCollection; class ActionList; class KSVAction; @@ -36,7 +36,7 @@ class KSVContent; class KSVPreferences; class RunlevelAuthIcon; -class KSVTopLevel : public KMainWindow +class KSVTopLevel : public TDEMainWindow { Q_OBJECT @@ -55,7 +55,7 @@ protected: void initActions (); void initStatusBar(); - KActionCollection* filteredActions (); + TDEActionCollection* filteredActions (); private slots: void slotClearChanges(); @@ -122,19 +122,19 @@ private: KSVPreferences* mPreferences; - KAction *mEditUndo, *mEditRedo, *mEditCut, *mEditCopy, *mEditPaste, + TDEAction *mEditUndo, *mEditRedo, *mEditCut, *mEditCopy, *mEditPaste, *mPasteAppend, *mEditProperties; - KAction *mFileRevert, *mFileLoad, *mFilePrint, *mFilePrintLog, + TDEAction *mFileRevert, *mFileLoad, *mFilePrint, *mFilePrintLog, *mFileSave, *mFileSaveAs, *mFileSaveLog, *mFileQuit; - KToggleAction *mToolsStartService, *mToolsStopService, + TDEToggleAction *mToolsStartService, *mToolsStopService, *mToolsRestartService, *mToolsEditService; - KToggleAction *mOptionsToggleLog; + TDEToggleAction *mOptionsToggleLog; - KActionMenu* mOpenWith; - KAction* mOpenDefault; + TDEActionMenu* mOpenWith; + TDEAction* mOpenDefault; bool mChanged; diff --git a/ksysv/ksv_conf.cpp b/ksysv/ksv_conf.cpp index 37a24ee..1939d57 100644 --- a/ksysv/ksv_conf.cpp +++ b/ksysv/ksv_conf.cpp @@ -101,7 +101,7 @@ void KSVConfig::writeSettings() { mConfig->writeEntry("Number Font", mNumberFont); // save screen geometry - KMainWindow* mw = static_cast<KMainWindow*>(kapp->mainWidget()); + TDEMainWindow* mw = static_cast<TDEMainWindow*>(kapp->mainWidget()); if (mw) { diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp index 65a1b3e..3edaaf0 100644 --- a/ksysv/ksvdraglist.cpp +++ b/ksysv/ksvdraglist.cpp @@ -57,7 +57,7 @@ #include "ksvdrag.h" #include "ActionList.h" -KSVItem::KSVItem (KListView* view) +KSVItem::KSVItem (TDEListView* view) : TQListViewItem (view), mData (new KSVData()), mConfig (KSVConfig::self()), @@ -110,7 +110,7 @@ TQString KSVItem::key (int, bool) const return mData->numberString() + mData->label(); } -KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ) +KSVItem::KSVItem (TDEListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ) : TQListViewItem (view), mData (new KSVData (file, path, label, nr)), mConfig (KSVConfig::self()), @@ -310,11 +310,11 @@ void KSVItem::setOriginalRunlevel (const TQString& rl) //----------------------- KSVDragList::KSVDragList ( TQWidget* parent, const char* name ) - : KListView (parent, name), + : TDEListView (parent, name), mItemToDrag (0L), - mDragMenu (new KPopupMenu (this)), - mDragCopyMenu (new KPopupMenu (this)), - mDragMoveMenu (new KPopupMenu (this)), + mDragMenu (new TDEPopupMenu (this)), + mDragCopyMenu (new TDEPopupMenu (this)), + mDragMoveMenu (new TDEPopupMenu (this)), mDisplayToolTips (true), mCommonToolTips (true) { @@ -400,7 +400,7 @@ void KSVDragList::setDefaultIcon (const TQPixmap& icon) void KSVDragList::clear () { - KListView::clear(); + TDEListView::clear(); clearRMList(); } @@ -558,7 +558,7 @@ bool KSVDragList::acceptDrag (TQDropEvent* e) const void KSVDragList::focusInEvent (TQFocusEvent* e) { - KListView::focusInEvent(e); + TDEListView::focusInEvent(e); if (!currentItem()) setCurrentItem (firstChild()); diff --git a/ksysv/ksvdraglist.h b/ksysv/ksvdraglist.h index 76ef598..c086f02 100644 --- a/ksysv/ksvdraglist.h +++ b/ksysv/ksvdraglist.h @@ -46,7 +46,7 @@ class TQPen; class KSVAction; class SimpleAction; class KSVDragList; -class KPopupMenu; +class TDEPopupMenu; class KSVConfig; class KDLToolTip; @@ -64,10 +64,10 @@ public: Last } Columns; - KSVItem (KListView*); + KSVItem (TDEListView*); KSVItem (const KSVItem&); explicit KSVItem (KSVDragList*, const KSVData&); - KSVItem (KListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ); + KSVItem (TDEListView* view, TQString file, TQString path, TQString label, TQ_INT8 nr ); virtual ~KSVItem (); virtual TQString key (int col, bool ascending) const; @@ -149,7 +149,7 @@ private: TQColor mChangedSelectedColor; }; -class KSVDragList : public KListView +class KSVDragList : public TDEListView { Q_OBJECT @@ -175,9 +175,9 @@ public: */ inline bool isOrigin() const { return mOrigin; } - inline KSVItem* currentItem() { return static_cast<KSVItem*> (KListView::currentItem()); } + inline KSVItem* currentItem() { return static_cast<KSVItem*> (TDEListView::currentItem()); } - inline KSVItem* lastItem () { return static_cast<KSVItem*> (KListView::lastItem()); } + inline KSVItem* lastItem () { return static_cast<KSVItem*> (TDEListView::lastItem()); } /** * @return true if the insertion was successful. @@ -248,9 +248,9 @@ private: TQColor mChangedNormalColor; TQColor mChangedSelectedColor; - KPopupMenu* mDragMenu; - KPopupMenu* mDragCopyMenu; - KPopupMenu* mDragMoveMenu; + TDEPopupMenu* mDragMenu; + TDEPopupMenu* mDragCopyMenu; + TDEPopupMenu* mDragMoveMenu; KDLToolTip* toolTip; typedef enum { Copy, Move } DragAction; diff --git a/ksysv/ksvlookandfeel.cpp b/ksysv/ksvlookandfeel.cpp index 9c68cfb..3284107 100644 --- a/ksysv/ksvlookandfeel.cpp +++ b/ksysv/ksvlookandfeel.cpp @@ -55,7 +55,7 @@ KSVLookAndFeel::~KSVLookAndFeel() */ void KSVLookAndFeel::chooseNumberFont() { - KFontDialog::getFont (mNumberFont, false, this); + TDEFontDialog::getFont (mNumberFont, false, this); setNumberFont (mNumberFont); emit configChanged(); } @@ -65,7 +65,7 @@ void KSVLookAndFeel::chooseNumberFont() */ void KSVLookAndFeel::chooseServiceFont() { - KFontDialog::getFont (mServiceFont, false, this); + TDEFontDialog::getFont (mServiceFont, false, this); setServiceFont (mServiceFont); emit configChanged(); } |