summaryrefslogtreecommitdiffstats
path: root/konq-plugins/rellinks/plugin_rellinks.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 23:17:49 -0600
committerTimothy Pearson <[email protected]>2013-02-01 23:17:49 -0600
commita9184bb205c837f932e03b2a6cac578582f36ed5 (patch)
tree0b69cad530a4c1d0aa8f36ecd50f72f2f589e980 /konq-plugins/rellinks/plugin_rellinks.cpp
parent74a2067d286867e313f736d6733407586b71195e (diff)
downloadtdeaddons-a9184bb205c837f932e03b2a6cac578582f36ed5.tar.gz
tdeaddons-a9184bb205c837f932e03b2a6cac578582f36ed5.zip
Rename many classes and header files to avoid conflicts with KDE4
Diffstat (limited to 'konq-plugins/rellinks/plugin_rellinks.cpp')
-rw-r--r--konq-plugins/rellinks/plugin_rellinks.cpp184
1 files changed, 92 insertions, 92 deletions
diff --git a/konq-plugins/rellinks/plugin_rellinks.cpp b/konq-plugins/rellinks/plugin_rellinks.cpp
index 880a448..374e888 100644
--- a/konq-plugins/rellinks/plugin_rellinks.cpp
+++ b/konq-plugins/rellinks/plugin_rellinks.cpp
@@ -32,7 +32,7 @@
#include <dom/dom_element.h>
#include <dom/dom_string.h>
#include <dom/html_document.h>
-#include <kaction.h>
+#include <tdeaction.h>
#include <kdebug.h>
#include <kgenericfactory.h>
#include <tdehtml_part.h>
@@ -40,9 +40,9 @@
#include <kiconloader.h>
#include <kinstance.h>
#include <klocale.h>
-#include <kpopupmenu.h>
-#include <kshortcut.h>
-#include <ktoolbar.h>
+#include <tdepopupmenu.h>
+#include <tdeshortcut.h>
+#include <tdetoolbar.h>
#include <kurl.h>
// local includes
@@ -70,106 +70,106 @@ RelLinksPlugin::RelLinksPlugin(TQObject *parent, const char *name, const TQStrin
setInstance(RelLinksFactory::instance());
// ------------- Navigation links --------------
- kaction_map["home"] = new TDEAction( i18n("&Top"), "2uparrow", TDEShortcut("Ctrl+Alt+T"), this, TQT_SLOT(goHome()), actionCollection(), "rellinks_top" );
- kaction_map["home"]->setWhatsThis( i18n("<p>This link references a home page or the top of some hierarchy.</p>") );
+ tdeaction_map["home"] = new TDEAction( i18n("&Top"), "2uparrow", TDEShortcut("Ctrl+Alt+T"), this, TQT_SLOT(goHome()), actionCollection(), "rellinks_top" );
+ tdeaction_map["home"]->setWhatsThis( i18n("<p>This link references a home page or the top of some hierarchy.</p>") );
- kaction_map["up"] = new TDEAction( i18n("&Up"), "1uparrow", TDEShortcut("Ctrl+Alt+U"), this, TQT_SLOT(goUp()), actionCollection(), "rellinks_up" );
- kaction_map["up"]->setWhatsThis( i18n("<p>This link references the immediate parent of the current document.</p>") );
+ tdeaction_map["up"] = new TDEAction( i18n("&Up"), "1uparrow", TDEShortcut("Ctrl+Alt+U"), this, TQT_SLOT(goUp()), actionCollection(), "rellinks_up" );
+ tdeaction_map["up"]->setWhatsThis( i18n("<p>This link references the immediate parent of the current document.</p>") );
bool isRTL = TQApplication::reverseLayout();
- kaction_map["begin"] = new TDEAction( i18n("&First"), isRTL ? "2rightarrow" : "2leftarrow", TDEShortcut("Ctrl+Alt+F"), this, TQT_SLOT(goFirst()), actionCollection(), "rellinks_first" );
- kaction_map["begin"]->setWhatsThis( i18n("<p>This link type tells search engines which document is considered by the author to be the starting point of the collection.</p>") );
+ tdeaction_map["begin"] = new TDEAction( i18n("&First"), isRTL ? "2rightarrow" : "2leftarrow", TDEShortcut("Ctrl+Alt+F"), this, TQT_SLOT(goFirst()), actionCollection(), "rellinks_first" );
+ tdeaction_map["begin"]->setWhatsThis( i18n("<p>This link type tells search engines which document is considered by the author to be the starting point of the collection.</p>") );
- kaction_map["prev"] = new TDEAction( i18n("&Previous"), isRTL ? "1rightarrow" : "1leftarrow", TDEShortcut("Ctrl+Alt+P"), this, TQT_SLOT(goPrevious()), actionCollection(), "rellinks_previous" );
- kaction_map["prev"]->setWhatsThis( i18n("<p>This link references the previous document in an ordered series of documents.</p>") );
+ tdeaction_map["prev"] = new TDEAction( i18n("&Previous"), isRTL ? "1rightarrow" : "1leftarrow", TDEShortcut("Ctrl+Alt+P"), this, TQT_SLOT(goPrevious()), actionCollection(), "rellinks_previous" );
+ tdeaction_map["prev"]->setWhatsThis( i18n("<p>This link references the previous document in an ordered series of documents.</p>") );
- kaction_map["next"] = new TDEAction( i18n("&Next"), isRTL ? "1leftarrow" : "1rightarrow", TDEShortcut("Ctrl+Alt+N"), this, TQT_SLOT(goNext()), actionCollection(), "rellinks_next" );
- kaction_map["next"]->setWhatsThis( i18n("<p>This link references the next document in an ordered series of documents.</p>") );
+ tdeaction_map["next"] = new TDEAction( i18n("&Next"), isRTL ? "1leftarrow" : "1rightarrow", TDEShortcut("Ctrl+Alt+N"), this, TQT_SLOT(goNext()), actionCollection(), "rellinks_next" );
+ tdeaction_map["next"]->setWhatsThis( i18n("<p>This link references the next document in an ordered series of documents.</p>") );
- kaction_map["last"] = new TDEAction( i18n("&Last"), isRTL ? "2leftarrow" : "2rightarrow", TDEShortcut("Ctrl+Alt+L"), this, TQT_SLOT(goLast()), actionCollection(), "rellinks_last" );
- kaction_map["last"]->setWhatsThis( i18n("<p>This link references the end of a sequence of documents.</p>") );
+ tdeaction_map["last"] = new TDEAction( i18n("&Last"), isRTL ? "2leftarrow" : "2rightarrow", TDEShortcut("Ctrl+Alt+L"), this, TQT_SLOT(goLast()), actionCollection(), "rellinks_last" );
+ tdeaction_map["last"]->setWhatsThis( i18n("<p>This link references the end of a sequence of documents.</p>") );
// ------------ special items --------------------------
- kaction_map["search"] = new TDEAction( i18n("&Search"), "filefind", TDEShortcut("Ctrl+Alt+S"), this, TQT_SLOT(goSearch()), actionCollection(), "rellinks_search" );
- kaction_map["search"]->setWhatsThis( i18n("<p>This link references the search.</p>") );
+ tdeaction_map["search"] = new TDEAction( i18n("&Search"), "filefind", TDEShortcut("Ctrl+Alt+S"), this, TQT_SLOT(goSearch()), actionCollection(), "rellinks_search" );
+ tdeaction_map["search"]->setWhatsThis( i18n("<p>This link references the search.</p>") );
// ------------ Document structure links ---------------
m_document = new TDEActionMenu( i18n("Document"), "contents", actionCollection(), "rellinks_document" );
m_document->setWhatsThis( i18n("<p>This menu contains the links referring the document information.</p>") );
m_document->setDelayed(false);
- kaction_map["contents"] = new TDEAction( i18n("Table of &Contents"), "contents", TDEShortcut("Ctrl+Alt+C"), this, TQT_SLOT(goContents()), actionCollection(), "rellinks_toc" );
- m_document->insert(kaction_map["contents"]);
- kaction_map["contents"]->setWhatsThis( i18n("<p>This link references the table of contents.</p>") );
-
- kactionmenu_map["chapter"] = new TDEActionMenu( i18n("Chapters"), "fileopen", actionCollection(), "rellinks_chapters" );
- m_document->insert(kactionmenu_map["chapter"]);
- connect( kactionmenu_map["chapter"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT(goChapter(int)));
- kactionmenu_map["chapter"]->setWhatsThis( i18n("<p>This menu references the chapters of the document.</p>") );
- kactionmenu_map["chapter"]->setDelayed(false);
-
- kactionmenu_map["section"] = new TDEActionMenu( i18n("Sections"), "fileopen", actionCollection(), "rellinks_sections" );
- m_document->insert(kactionmenu_map["section"]);
- connect( kactionmenu_map["section"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goSection( int ) ) );
- kactionmenu_map["section"]->setWhatsThis( i18n("<p>This menu references the sections of the document.</p>") );
- kactionmenu_map["section"]->setDelayed(false);
-
- kactionmenu_map["subsection"] = new TDEActionMenu( i18n("Subsections"), "fileopen", actionCollection(), "rellinks_subsections" );
- m_document->insert(kactionmenu_map["subsection"]);
- connect( kactionmenu_map["subsection"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goSubsection( int ) ) );
- kactionmenu_map["subsection"]->setWhatsThis( i18n("<p>This menu references the subsections of the document.</p>") );
- kactionmenu_map["subsection"]->setDelayed(false);
-
- kactionmenu_map["appendix"] = new TDEActionMenu( i18n("Appendix"), "edit", actionCollection(), "rellinks_appendix" );
- m_document->insert(kactionmenu_map["appendix"]);
- connect( kactionmenu_map["appendix"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAppendix( int ) ) );
- kactionmenu_map["appendix"]->setWhatsThis( i18n("<p>This link references the appendix.</p>") );
- kactionmenu_map["appendix"]->setDelayed(false);
-
- kaction_map["glossary"] = new TDEAction( i18n("&Glossary"), "flag", TDEShortcut("Ctrl+Alt+G"), this, TQT_SLOT(goGlossary()), actionCollection(), "rellinks_glossary" );
- m_document->insert(kaction_map["glossary"]);
- kaction_map["glossary"]->setWhatsThis( i18n("<p>This link references the glossary.</p>") );
-
- kaction_map["index"] = new TDEAction( i18n("&Index"), "info", TDEShortcut("Ctrl+Alt+I"), this, TQT_SLOT(goIndex()), actionCollection(), "rellinks_index" );
- m_document->insert(kaction_map["index"]);
- kaction_map["index"]->setWhatsThis( i18n("<p>This link references the index.</p>") );
+ tdeaction_map["contents"] = new TDEAction( i18n("Table of &Contents"), "contents", TDEShortcut("Ctrl+Alt+C"), this, TQT_SLOT(goContents()), actionCollection(), "rellinks_toc" );
+ m_document->insert(tdeaction_map["contents"]);
+ tdeaction_map["contents"]->setWhatsThis( i18n("<p>This link references the table of contents.</p>") );
+
+ tdeactionmenu_map["chapter"] = new TDEActionMenu( i18n("Chapters"), "fileopen", actionCollection(), "rellinks_chapters" );
+ m_document->insert(tdeactionmenu_map["chapter"]);
+ connect( tdeactionmenu_map["chapter"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT(goChapter(int)));
+ tdeactionmenu_map["chapter"]->setWhatsThis( i18n("<p>This menu references the chapters of the document.</p>") );
+ tdeactionmenu_map["chapter"]->setDelayed(false);
+
+ tdeactionmenu_map["section"] = new TDEActionMenu( i18n("Sections"), "fileopen", actionCollection(), "rellinks_sections" );
+ m_document->insert(tdeactionmenu_map["section"]);
+ connect( tdeactionmenu_map["section"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goSection( int ) ) );
+ tdeactionmenu_map["section"]->setWhatsThis( i18n("<p>This menu references the sections of the document.</p>") );
+ tdeactionmenu_map["section"]->setDelayed(false);
+
+ tdeactionmenu_map["subsection"] = new TDEActionMenu( i18n("Subsections"), "fileopen", actionCollection(), "rellinks_subsections" );
+ m_document->insert(tdeactionmenu_map["subsection"]);
+ connect( tdeactionmenu_map["subsection"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goSubsection( int ) ) );
+ tdeactionmenu_map["subsection"]->setWhatsThis( i18n("<p>This menu references the subsections of the document.</p>") );
+ tdeactionmenu_map["subsection"]->setDelayed(false);
+
+ tdeactionmenu_map["appendix"] = new TDEActionMenu( i18n("Appendix"), "edit", actionCollection(), "rellinks_appendix" );
+ m_document->insert(tdeactionmenu_map["appendix"]);
+ connect( tdeactionmenu_map["appendix"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAppendix( int ) ) );
+ tdeactionmenu_map["appendix"]->setWhatsThis( i18n("<p>This link references the appendix.</p>") );
+ tdeactionmenu_map["appendix"]->setDelayed(false);
+
+ tdeaction_map["glossary"] = new TDEAction( i18n("&Glossary"), "flag", TDEShortcut("Ctrl+Alt+G"), this, TQT_SLOT(goGlossary()), actionCollection(), "rellinks_glossary" );
+ m_document->insert(tdeaction_map["glossary"]);
+ tdeaction_map["glossary"]->setWhatsThis( i18n("<p>This link references the glossary.</p>") );
+
+ tdeaction_map["index"] = new TDEAction( i18n("&Index"), "info", TDEShortcut("Ctrl+Alt+I"), this, TQT_SLOT(goIndex()), actionCollection(), "rellinks_index" );
+ m_document->insert(tdeaction_map["index"]);
+ tdeaction_map["index"]->setWhatsThis( i18n("<p>This link references the index.</p>") );
// Other links
m_more = new TDEActionMenu( i18n("More"), "misc", actionCollection(), "rellinks_more" );
m_more->setWhatsThis( i18n("<p>This menu contains other important links.</p>") );
m_more->setDelayed(false);
- kaction_map["help"] = new TDEAction( i18n("&Help"), "help", TDEShortcut("Ctrl+Alt+H"), this, TQT_SLOT(goHelp()), actionCollection(), "rellinks_help" );
- m_more->insert(kaction_map["help"]);
- kaction_map["help"]->setWhatsThis( i18n("<p>This link references the help.</p>") );
+ tdeaction_map["help"] = new TDEAction( i18n("&Help"), "help", TDEShortcut("Ctrl+Alt+H"), this, TQT_SLOT(goHelp()), actionCollection(), "rellinks_help" );
+ m_more->insert(tdeaction_map["help"]);
+ tdeaction_map["help"]->setWhatsThis( i18n("<p>This link references the help.</p>") );
- kaction_map["author"] = new TDEAction( i18n("&Authors"), "mail_new", TDEShortcut("Ctrl+Alt+A"), this, TQT_SLOT(goAuthor()), actionCollection(), "rellinks_authors" );
- m_more->insert(kaction_map["author"]);
- kaction_map["author"]->setWhatsThis( i18n("<p>This link references the author.</p>") );
+ tdeaction_map["author"] = new TDEAction( i18n("&Authors"), "mail_new", TDEShortcut("Ctrl+Alt+A"), this, TQT_SLOT(goAuthor()), actionCollection(), "rellinks_authors" );
+ m_more->insert(tdeaction_map["author"]);
+ tdeaction_map["author"]->setWhatsThis( i18n("<p>This link references the author.</p>") );
- kaction_map["copyright"] = new TDEAction( i18n("Copy&right"), "signature", TDEShortcut("Ctrl+Alt+R"), this, TQT_SLOT(goCopyright()), actionCollection(), "rellinks_copyright" );
- m_more->insert(kaction_map["copyright"]);
- kaction_map["copyright"]->setWhatsThis( i18n("<p>This link references the copyright.</p>") );
+ tdeaction_map["copyright"] = new TDEAction( i18n("Copy&right"), "signature", TDEShortcut("Ctrl+Alt+R"), this, TQT_SLOT(goCopyright()), actionCollection(), "rellinks_copyright" );
+ m_more->insert(tdeaction_map["copyright"]);
+ tdeaction_map["copyright"]->setWhatsThis( i18n("<p>This link references the copyright.</p>") );
- kactionmenu_map["bookmark"] = new TDEActionMenu( i18n("Bookmarks"), "bookmark_folder", actionCollection(), "rellinks_bookmarks" );
- m_more->insert(kactionmenu_map["bookmark"]);
- kactionmenu_map["bookmark"]->setWhatsThis( i18n("<p>This menu references the bookmarks.</p>") );
- connect( kactionmenu_map["bookmark"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goBookmark( int ) ) );
- kactionmenu_map["bookmark"]->setDelayed(false);
+ tdeactionmenu_map["bookmark"] = new TDEActionMenu( i18n("Bookmarks"), "bookmark_folder", actionCollection(), "rellinks_bookmarks" );
+ m_more->insert(tdeactionmenu_map["bookmark"]);
+ tdeactionmenu_map["bookmark"]->setWhatsThis( i18n("<p>This menu references the bookmarks.</p>") );
+ connect( tdeactionmenu_map["bookmark"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goBookmark( int ) ) );
+ tdeactionmenu_map["bookmark"]->setDelayed(false);
- kactionmenu_map["alternate"] = new TDEActionMenu( i18n("Other Versions"), "attach", actionCollection(), "rellinks_other_versions" );
- m_more->insert(kactionmenu_map["alternate"]);
- kactionmenu_map["alternate"]->setWhatsThis( i18n("<p>This link references the alternate versions of this document.</p>") );
- connect( kactionmenu_map["alternate"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAlternate( int ) ) );
- kactionmenu_map["alternate"]->setDelayed(false);
+ tdeactionmenu_map["alternate"] = new TDEActionMenu( i18n("Other Versions"), "attach", actionCollection(), "rellinks_other_versions" );
+ m_more->insert(tdeactionmenu_map["alternate"]);
+ tdeactionmenu_map["alternate"]->setWhatsThis( i18n("<p>This link references the alternate versions of this document.</p>") );
+ connect( tdeactionmenu_map["alternate"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAlternate( int ) ) );
+ tdeactionmenu_map["alternate"]->setDelayed(false);
// Unclassified menu
m_links = new TDEActionMenu( i18n("Miscellaneous"), "rellinks", actionCollection(), "rellinks_links" );
- kactionmenu_map["unclassified"] = m_links;
- kactionmenu_map["unclassified"]->setWhatsThis( i18n("<p>Miscellaneous links.</p>") );
- connect( kactionmenu_map["unclassified"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAllElements( int ) ) );
- kactionmenu_map["unclassified"]->setDelayed(false);
+ tdeactionmenu_map["unclassified"] = m_links;
+ tdeactionmenu_map["unclassified"]->setWhatsThis( i18n("<p>Miscellaneous links.</p>") );
+ connect( tdeactionmenu_map["unclassified"]->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( goAllElements( int ) ) );
+ tdeactionmenu_map["unclassified"]->setDelayed(false);
// We unactivate all the possible actions
disableAll();
@@ -325,33 +325,33 @@ void RelLinksPlugin::updateToolbar() {
// -- Buttons or menu items activation / creation --
if (lrel == "bookmark" || lrel == "alternate") {
- int id = kactionmenu_map[lrel]->popupMenu()->insertItem( title );
+ int id = tdeactionmenu_map[lrel]->popupMenu()->insertItem( title );
m_more->setEnabled(true);
- kactionmenu_map[lrel]->setEnabled(true);
+ tdeactionmenu_map[lrel]->setEnabled(true);
element_map[lrel][id] = e;
} else if (lrel == "appendix" || lrel == "chapter" || lrel == "section" || lrel == "subsection") {
- int id = kactionmenu_map[lrel]->popupMenu()->insertItem( title );
+ int id = tdeactionmenu_map[lrel]->popupMenu()->insertItem( title );
m_document->setEnabled(true);
- kactionmenu_map[lrel]->setEnabled(true);
+ tdeactionmenu_map[lrel]->setEnabled(true);
element_map[lrel][id] = e;
} else {
// It is a unique action
element_map[lrel][0] = e;
- if (kaction_map[lrel]) {
- kaction_map[lrel]->setEnabled(true);
+ if (tdeaction_map[lrel]) {
+ tdeaction_map[lrel]->setEnabled(true);
// Tooltip
if (hreflang.isEmpty()) {
- kaction_map[lrel]->setToolTip( title );
+ tdeaction_map[lrel]->setToolTip( title );
} else {
- kaction_map[lrel]->setToolTip( title + " [" + hreflang + "]");
+ tdeaction_map[lrel]->setToolTip( title + " [" + hreflang + "]");
}
} else {
// For the moment all the elements are reference in a separated menu
// TODO : reference the unknown ?
- int id = kactionmenu_map["unclassified"]->popupMenu()->insertItem( lrel + " : " + title );
- kactionmenu_map["unclassified"]->setEnabled(true);
+ int id = tdeactionmenu_map["unclassified"]->popupMenu()->insertItem( lrel + " : " + title );
+ tdeactionmenu_map["unclassified"]->setEnabled(true);
element_map["unclassified"][id] = e;
}
@@ -398,8 +398,8 @@ void RelLinksPlugin::guessRelations()
DOM::Element e= m_part->document().createElement("link");
e.setAttribute("href",href);
element_map["next"][0] = e;
- kaction_map["next"]->setEnabled(true);
- kaction_map["next"]->setToolTip( title );
+ tdeaction_map["next"]->setEnabled(true);
+ tdeaction_map["next"]->setToolTip( title );
if(val>1)
{
@@ -412,8 +412,8 @@ void RelLinksPlugin::guessRelations()
e= m_part->document().createElement("link");
e.setAttribute("href",href);
element_map["prev"][0] = e;
- kaction_map["prev"]->setEnabled(true);
- kaction_map["prev"]->setToolTip( title );
+ tdeaction_map["prev"]->setEnabled(true);
+ tdeaction_map["prev"]->setToolTip( title );
}
}
}
@@ -533,7 +533,7 @@ void RelLinksPlugin::disableAll() {
// Clear actions
TDEActionMap::Iterator it;
- for ( it = kaction_map.begin(); it != kaction_map.end(); ++it ) {
+ for ( it = tdeaction_map.begin(); it != tdeaction_map.end(); ++it ) {
// If I don't test it crash :(
if (it.data()) {
it.data()->setEnabled(false);
@@ -543,7 +543,7 @@ void RelLinksPlugin::disableAll() {
// Clear actions
TDEActionMenuMap::Iterator itmenu;
- for ( itmenu = kactionmenu_map.begin(); itmenu != kactionmenu_map.end(); ++itmenu ) {
+ for ( itmenu = tdeactionmenu_map.begin(); itmenu != tdeactionmenu_map.end(); ++itmenu ) {
// If I don't test it crash :(
if (itmenu.data()) {
itmenu.data()->popupMenu()->clear();