diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:16:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:16:01 -0600 |
commit | 9771f17f8cc5252b12ec5f3edf47ff9bffdf997f (patch) | |
tree | b9e389db87bdba126010d03fb5bccdc748d0e6fa /klinkstatus | |
parent | 9930e16dde86b7de9b792613d826f4f8648b9768 (diff) | |
download | tdewebdev-9771f17f8cc5252b12ec5f3edf47ff9bffdf997f.tar.gz tdewebdev-9771f17f8cc5252b12ec5f3edf47ff9bffdf997f.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'klinkstatus')
-rw-r--r-- | klinkstatus/src/actionmanager.cpp | 46 | ||||
-rw-r--r-- | klinkstatus/src/actionmanager.h | 8 | ||||
-rw-r--r-- | klinkstatus/src/klinkstatus.cpp | 14 | ||||
-rw-r--r-- | klinkstatus/src/klinkstatus.h | 6 | ||||
-rw-r--r-- | klinkstatus/src/klinkstatus_part.cpp | 2 | ||||
-rw-r--r-- | klinkstatus/src/klinkstatus_part.h | 2 | ||||
-rw-r--r-- | klinkstatus/src/ui/klshistorycombo.cpp | 4 | ||||
-rw-r--r-- | klinkstatus/src/ui/sessionwidget.cpp | 2 | ||||
-rw-r--r-- | klinkstatus/src/ui/sessionwidget.h | 4 | ||||
-rw-r--r-- | klinkstatus/src/ui/treeview.cpp | 14 | ||||
-rw-r--r-- | klinkstatus/src/ui/treeview.h | 4 |
11 files changed, 53 insertions, 53 deletions
diff --git a/klinkstatus/src/actionmanager.cpp b/klinkstatus/src/actionmanager.cpp index 3a775cf4..7034c840 100644 --- a/klinkstatus/src/actionmanager.cpp +++ b/klinkstatus/src/actionmanager.cpp @@ -56,7 +56,7 @@ public: : part(0), tabWidgetSession(0), sessionWidget(0) {} - KActionCollection* actionCollection; + TDEActionCollection* actionCollection; KLinkStatusPart* part; TabWidgetSession* tabWidgetSession; @@ -83,21 +83,21 @@ void ActionManager::initPart(KLinkStatusPart* part) d->part = part; d->actionCollection = part->actionCollection(); - KAction* action = 0; + TDEAction* action = 0; // *************** File menu ********************* - new KAction(i18n("New Link Check"), "filenew", + new TDEAction(i18n("New Link Check"), "filenew", 0, d->part, TQT_SLOT(slotNewLinkCheck()), TQT_TQOBJECT(d->actionCollection), "new_link_check"); - new KAction(i18n("Open URL..."), "fileopen", + new TDEAction(i18n("Open URL..."), "fileopen", 0, d->part, TQT_SLOT(slotOpenLink()), TQT_TQOBJECT(d->actionCollection), "open_link"); - action = new KAction(i18n("Close Tab"), "fileclose", + action = new TDEAction(i18n("Close Tab"), "fileclose", 0, d->part, TQT_SLOT(slotClose()), TQT_TQOBJECT(d->actionCollection), "close_tab"); @@ -105,17 +105,17 @@ void ActionManager::initPart(KLinkStatusPart* part) // *************** Settings menu ********************* - (void) new KAction(i18n("Configure KLinkStatus..."), "configure", + (void) new TDEAction(i18n("Configure KLinkStatus..."), "configure", 0, d->part, TQT_SLOT(slotConfigureKLinkStatus()), TQT_TQOBJECT(d->actionCollection), "configure_klinkstatus"); // *************** Help menu ********************* - (void) new KAction(i18n("About KLinkStatus"), "klinkstatus", + (void) new TDEAction(i18n("About KLinkStatus"), "klinkstatus", 0, d->part, TQT_SLOT(slotAbout()), TQT_TQOBJECT(d->actionCollection), "about_klinkstatus"); - (void) new KAction(i18n("&Report Bug..."), 0, 0, d->part, + (void) new TDEAction(i18n("&Report Bug..."), 0, 0, d->part, TQT_SLOT(slotReportBug()), TQT_TQOBJECT(d->actionCollection), "report_bug"); // *************** View menu ********************* @@ -132,7 +132,7 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // *************** File menu ********************* - KAction* action = new KAction(i18n("E&xport Results as HTML..."), "filesave", 0, + TDEAction* action = new TDEAction(i18n("E&xport Results as HTML..."), "filesave", 0, TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotExportAsHTML()), TQT_TQOBJECT(d->actionCollection), "file_export_html"); action->setEnabled(false); @@ -140,38 +140,38 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // *************** View menu ********************* // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget - KToggleAction* toggle_action = new KToggleAction(i18n("&Follow last Link checked"), + TDEToggleAction* toggle_action = new TDEToggleAction(i18n("&Follow last Link checked"), "make_tdevelop", "Ctrl+f", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotFollowLastLinkChecked()), TQT_TQOBJECT(d->actionCollection), "follow_last_link_checked"); toggle_action->setChecked(KLSConfig::followLastLinkChecked()); // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget - toggle_action = new KToggleAction(i18n("&Hide Search Panel"), "bottom", "Ctrl+h", + toggle_action = new TDEToggleAction(i18n("&Hide Search Panel"), "bottom", "Ctrl+h", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotHideSearchPanel()), TQT_TQOBJECT(d->actionCollection), "hide_search_bar"); KGuiItem item(i18n("&Show Search Panel"), "top", "Show Search Panel"); toggle_action->setCheckedState(item); - new KAction(i18n("&Reset Search Options"), "reload", "F5", + new TDEAction(i18n("&Reset Search Options"), "reload", "F5", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotResetSearchOptions()), TQT_TQOBJECT(d->actionCollection), "reset_search_bar"); // *************** Search menu ********************* - toggle_action = new KToggleAction(i18n("&Start Search"), + toggle_action = new TDEToggleAction(i18n("&Start Search"), "player_play", "Ctrl+s", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotStartSearch()), TQT_TQOBJECT(d->actionCollection), "start_search"); toggle_action->setEnabled(false); - toggle_action = new KToggleAction(i18n("&Pause Search"), + toggle_action = new TDEToggleAction(i18n("&Pause Search"), "player_pause", "Ctrl+p", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotPauseSearch()), TQT_TQOBJECT(d->actionCollection), "pause_search"); toggle_action->setEnabled(false); - action = new KAction(i18n("St&op Search"), + action = new TDEAction(i18n("St&op Search"), "player_stop", "Ctrl+c", TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotStopSearch()), TQT_TQOBJECT(d->actionCollection), "stop_search"); @@ -194,21 +194,21 @@ TQWidget* ActionManager::container(const char* name) return d->part->factory()->container(name, d->part); } -KActionCollection* ActionManager::actionCollection() +TDEActionCollection* ActionManager::actionCollection() { return d->actionCollection; } -KAction* ActionManager::action(const char* name, const char* classname) +TDEAction* ActionManager::action(const char* name, const char* classname) { return d->actionCollection != 0 ? d->actionCollection->action(name, classname) : 0; } void ActionManager::slotUpdateSessionWidgetActions(SessionWidget* page) { - KToggleAction* start_search_action_ = static_cast<KToggleAction*> (action("start_search")); - KToggleAction* pause_search_action_ = static_cast<KToggleAction*> (action("pause_search")); - KAction* stop_search_action_ = action("stop_search"); + TDEToggleAction* start_search_action_ = static_cast<TDEToggleAction*> (action("start_search")); + TDEToggleAction* pause_search_action_ = static_cast<TDEToggleAction*> (action("pause_search")); + TDEAction* stop_search_action_ = action("stop_search"); if(page->inProgress()) { @@ -250,17 +250,17 @@ void ActionManager::slotUpdateSessionWidgetActions(SessionWidget* page) // ____________________________________________________________________ - KToggleAction* toggleAction = static_cast<KToggleAction*> (action("follow_last_link_checked")); + TDEToggleAction* toggleAction = static_cast<TDEToggleAction*> (action("follow_last_link_checked")); if(!toggleAction) // the first sessionWidget is created before initSessionWidget is called { initSessionWidget(page); - toggleAction = static_cast<KToggleAction*> (action("follow_last_link_checked")); + toggleAction = static_cast<TDEToggleAction*> (action("follow_last_link_checked")); } Q_ASSERT(toggleAction); toggleAction->setChecked(page->followLastLinkChecked()); - toggleAction = static_cast<KToggleAction*> (action("hide_search_bar")); + toggleAction = static_cast<TDEToggleAction*> (action("hide_search_bar")); Q_ASSERT(toggleAction); toggleAction->setChecked(page->buttongroup_search->isHidden()); diff --git a/klinkstatus/src/actionmanager.h b/klinkstatus/src/actionmanager.h index 4fafcd8f..fd77b215 100644 --- a/klinkstatus/src/actionmanager.h +++ b/klinkstatus/src/actionmanager.h @@ -22,8 +22,8 @@ #include <tqobject.h> -class KAction; -class KActionCollection; +class TDEAction; +class TDEActionCollection; class SessionWidget; class KLinkStatusPart; @@ -45,7 +45,7 @@ public: static ActionManager* getInstance(); static void setInstance(ActionManager* manager); - virtual KAction* action(const char* name, const char* classname=0); + virtual TDEAction* action(const char* name, const char* classname=0); virtual TQWidget* container(const char* name); void initPart(KLinkStatusPart* part); @@ -57,7 +57,7 @@ public slots: protected: - KActionCollection* actionCollection(); + TDEActionCollection* actionCollection(); private: diff --git a/klinkstatus/src/klinkstatus.cpp b/klinkstatus/src/klinkstatus.cpp index 8309cb19..b344e95d 100644 --- a/klinkstatus/src/klinkstatus.cpp +++ b/klinkstatus/src/klinkstatus.cpp @@ -125,17 +125,17 @@ void KLinkStatus::setupActions() void KLinkStatus::setupPartActions() { Q_ASSERT(m_part); - KActionCollection* part_action_collection = m_part->actionCollection(); - part_action_collection->action("new_link_check")->setShortcut(KStdAccel::shortcut(KStdAccel::New)); - part_action_collection->action("open_link")->setShortcut(KStdAccel::shortcut(KStdAccel::Open)); - part_action_collection->action("close_tab")->setShortcut(KStdAccel::shortcut(KStdAccel::Close)); + TDEActionCollection* part_action_collection = m_part->actionCollection(); + part_action_collection->action("new_link_check")->setShortcut(TDEStdAccel::shortcut(TDEStdAccel::New)); + part_action_collection->action("open_link")->setShortcut(TDEStdAccel::shortcut(TDEStdAccel::Open)); + part_action_collection->action("close_tab")->setShortcut(TDEStdAccel::shortcut(TDEStdAccel::Close)); } void KLinkStatus::removeDuplicatedActions() { - KActionCollection* part_action_collection = m_part->actionCollection(); - KAction* part_about_action = part_action_collection->action("about_klinkstatus"); - KAction* part_report_action = part_action_collection->action("report_bug"); + TDEActionCollection* part_action_collection = m_part->actionCollection(); + TDEAction* part_about_action = part_action_collection->action("about_klinkstatus"); + TDEAction* part_report_action = part_action_collection->action("report_bug"); TQWidget* container = part_about_action->container(0); // call this only once or segfault part_about_action->unplug(container); diff --git a/klinkstatus/src/klinkstatus.h b/klinkstatus/src/klinkstatus.h index 4025d820..fd9a116b 100644 --- a/klinkstatus/src/klinkstatus.h +++ b/klinkstatus/src/klinkstatus.h @@ -28,7 +28,7 @@ #include <kapplication.h> #include <tdeparts/mainwindow.h> -class KToggleAction; +class TDEToggleAction; /** * This is the application "Shell". It has a menubar, toolbar, and @@ -80,8 +80,8 @@ private: private: KParts::ReadOnlyPart *m_part; - KToggleAction *m_toolbarAction; - KToggleAction *m_statusbarAction; + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; }; #endif // _KLINKSTATUS_H_ diff --git a/klinkstatus/src/klinkstatus_part.cpp b/klinkstatus/src/klinkstatus_part.cpp index a6a9fd8c..be6f9f76 100644 --- a/klinkstatus/src/klinkstatus_part.cpp +++ b/klinkstatus/src/klinkstatus_part.cpp @@ -90,7 +90,7 @@ void KLinkStatusPart::initGUI() void KLinkStatusPart::setModified(bool modified) { // get a handle on our Save action and make sure it is valid - KAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); + TDEAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); if (!save) return; diff --git a/klinkstatus/src/klinkstatus_part.h b/klinkstatus/src/klinkstatus_part.h index f7402dc1..58ee4833 100644 --- a/klinkstatus/src/klinkstatus_part.h +++ b/klinkstatus/src/klinkstatus_part.h @@ -32,7 +32,7 @@ class TQPainter; class KURL; class TDEAboutData; class KAboutApplication; -class KAction; +class TDEAction; class KLinkStatusPart: public KParts::ReadOnlyPart { diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index 13c8a16d..d1bbf780 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -92,8 +92,8 @@ bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) return false; } - int delete_word_back = KStdAccel::deleteWordBack().keyCodeQt(); - int delete_word_forward = KStdAccel::deleteWordForward().keyCodeQt(); + int delete_word_back = TDEStdAccel::deleteWordBack().keyCodeQt(); + int delete_word_forward = TDEStdAccel::deleteWordForward().keyCodeQt(); if ( KKey( e ) == KKey(delete_word_back) || KKey( e ) == KKey(delete_word_forward) || diff --git a/klinkstatus/src/ui/sessionwidget.cpp b/klinkstatus/src/ui/sessionwidget.cpp index a761499d..6567b7db 100644 --- a/klinkstatus/src/ui/sessionwidget.cpp +++ b/klinkstatus/src/ui/sessionwidget.cpp @@ -111,7 +111,7 @@ void SessionWidget::init() resultsSearchBar->hide(); - start_search_action_ = static_cast<KToggleAction*> (action_manager_->action("start_search")); + start_search_action_ = static_cast<TDEToggleAction*> (action_manager_->action("start_search")); connect(resultsSearchBar, TQT_SIGNAL(signalSearch(LinkMatcher)), this, TQT_SLOT(slotApplyFilter(LinkMatcher))); diff --git a/klinkstatus/src/ui/sessionwidget.h b/klinkstatus/src/ui/sessionwidget.h index 111b059d..49b5b2a3 100644 --- a/klinkstatus/src/ui/sessionwidget.h +++ b/klinkstatus/src/ui/sessionwidget.h @@ -36,7 +36,7 @@ class TQListViewItem; class KURL; class TDEConfig; -class KToggleAction; +class TDEToggleAction; #include <vector> @@ -142,7 +142,7 @@ private: int time_out_; bool tree_display_; // tree/flat result display bool follow_last_link_checked_; - KToggleAction* start_search_action_; + TDEToggleAction* start_search_action_; }; diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp index 882ca58f..bb24ac65 100644 --- a/klinkstatus/src/ui/treeview.cpp +++ b/klinkstatus/src/ui/treeview.cpp @@ -40,7 +40,7 @@ TreeView::TreeView(TQWidget *parent, const char *name) - : KListView(parent, name), + : TDEListView(parent, name), ResultView(), current_column_(0) { @@ -106,7 +106,7 @@ double TreeView::columnsWidth() const void TreeView::clear() { - KListView::clear(); + TDEListView::clear(); } void TreeView::removeColunas() @@ -116,7 +116,7 @@ void TreeView::removeColunas() void TreeView::show(ResultView::Status const& status) { - TQListViewItemIterator it(static_cast<KListView*> (this)); + TQListViewItemIterator it(static_cast<TDEListView*> (this)); while(it.current()) { TreeViewItem* item = myItem(it.current()); @@ -197,7 +197,7 @@ bool TreeView::isEmpty() const void TreeView::resizeEvent(TQResizeEvent *e) { - KListView::resizeEvent(e); + TDEListView::resizeEvent(e); resetColumns(); clipper()->repaint(); } @@ -394,7 +394,7 @@ TreeViewItem* TreeView::myItem(TQListViewItem* item) const TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after, LinkStatus const* linkstatus) - : KListViewItem(parent, after), + : TDEListViewItem(parent, after), last_child_(0), root_(parent) { init(linkstatus); @@ -402,7 +402,7 @@ TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after, TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQListViewItem* after, LinkStatus const* linkstatus) - : KListViewItem(listview_item, after), + : TDEListViewItem(listview_item, after), last_child_(0), root_(root) { @@ -470,7 +470,7 @@ void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, TQColor color(item.textStatusColor()); m_cg.setColor(TQColorGroup::Text, color); - KListViewItem::paintCell(p, m_cg, column, width, align); + TDEListViewItem::paintCell(p, m_cg, column, width, align); setHeight(22); } diff --git a/klinkstatus/src/ui/treeview.h b/klinkstatus/src/ui/treeview.h index de2eb9a2..3481108d 100644 --- a/klinkstatus/src/ui/treeview.h +++ b/klinkstatus/src/ui/treeview.h @@ -26,7 +26,7 @@ because of ResultView. ResultView class was to be the base interface to a TQTable and a TQListView, but the APIs are a little diferent... then I realize that a TQTable view isn't needed at all so some day I will clean this up. */ -class TreeView : public KListView, public ResultView +class TreeView : public TDEListView, public ResultView { Q_OBJECT @@ -87,7 +87,7 @@ inline void TreeView::setTreeDisplay(bool tree_display) { /* ******************************* TreeViewItem ******************************* */ -class TreeViewItem: public KListViewItem +class TreeViewItem: public TDEListViewItem { public: |