summaryrefslogtreecommitdiffstats
path: root/part/kxmleditorpart.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2016-03-26 12:41:49 +0100
committerSlávek Banko <slavek.banko@axis.cz>2016-03-26 14:15:13 +0100
commitea0a6815c10291d1ae30029f5183e3eaaf838fda (patch)
treee522c735ad703edee863c5d490f519f9cf713120 /part/kxmleditorpart.cpp
parent38dca4b75c471ddf950e2f9f03801c550d7d26fd (diff)
downloadkxmleditor-ea0a6815c10291d1ae30029f5183e3eaaf838fda.tar.gz
kxmleditor-ea0a6815c10291d1ae30029f5183e3eaaf838fda.zip
Initial TDE conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'part/kxmleditorpart.cpp')
-rw-r--r--part/kxmleditorpart.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/part/kxmleditorpart.cpp b/part/kxmleditorpart.cpp
index 33a8e51..671486f 100644
--- a/part/kxmleditorpart.cpp
+++ b/part/kxmleditorpart.cpp
@@ -48,21 +48,21 @@
#include <kinstance.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kaction.h>
+#include <tdelocale.h>
+#include <tdeaction.h>
#include <kstdaction.h>
-#include <kpopupmenu.h>
+#include <tdepopupmenu.h>
#include <kiconloader.h>
-#include <kmessagebox.h>
+#include <tdemessagebox.h>
#include <kprinter.h>
#include <ktar.h>
#include <kzip.h>
-#include <ktempfile.h>
-#include <kconfig.h>
+#include <tdetempfile.h>
+#include <tdeconfig.h>
#include <kurlrequester.h>
#include <kcommand.h>
-#include <ktoolbar.h>
-#include <kfiledialog.h>
+#include <tdetoolbar.h>
+#include <tdefiledialog.h>
#include <tqregexp.h>
#include <tqtextcodec.h>
@@ -121,43 +121,43 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
// edit actions
m_pActEditFind = KStdAction::find( this, SLOT(slotEditFind()), actionCollection());
m_pActEditFindNext = KStdAction::findNext( this, SLOT(slotEditFindNext()), actionCollection());
- m_pActEditDeselect = new KAction( i18n("D&eselect Node"), CTRL+Key_E, this,
+ m_pActEditDeselect = new TDEAction( i18n("D&eselect Node"), CTRL+Key_E, this,
SLOT(slotEditDeselect()), actionCollection(), "deselect" );
// view actions
- m_pActViewNodeUp = new KAction( i18n("To &Parent Node"), "up", 0, this,
+ m_pActViewNodeUp = new TDEAction( i18n("To &Parent Node"), "up", 0, this,
SLOT(slotViewNodeUp()), actionCollection(), "treeitem_up" );
- m_pActViewExpNode = new KToolBarPopupAction( i18n("&Expand Node"), "expand_node", CTRL+Key_Plus, this,
+ m_pActViewExpNode = new TDEToolBarPopupAction( i18n("&Expand Node"), "expand_node", CTRL+Key_Plus, this,
SLOT(slotViewExpNode()), actionCollection(), "treeitem_expand" );
- KPopupMenu * pMenuExpNode = m_pActViewExpNode->popupMenu();
+ TDEPopupMenu * pMenuExpNode = m_pActViewExpNode->popupMenu();
connect( pMenuExpNode, SIGNAL(activated(int)), this, SLOT(slotViewExpNode(int)) );
for ( uint i = 1; i <= 8; i++ )
pMenuExpNode->insertItem( i18n("Expand To Level %1").arg(i), i-1 );
- m_pActViewColNode = new KToolBarPopupAction( i18n("&Collapse Node"), "collapse_node", CTRL+Key_Minus, this,
+ m_pActViewColNode = new TDEToolBarPopupAction( i18n("&Collapse Node"), "collapse_node", CTRL+Key_Minus, this,
SLOT(slotViewColNode()), actionCollection(), "treeitem_collapse" );
- KPopupMenu * pMenuColNode = m_pActViewColNode->popupMenu();
+ TDEPopupMenu * pMenuColNode = m_pActViewColNode->popupMenu();
connect( pMenuColNode, SIGNAL(activated(int)), this, SLOT(slotViewColNode(int)) );
for ( uint i = 0; i <= 7; i++ )
pMenuColNode->insertItem( i18n("Collapse To Level %1").arg(i), i );
// bookmark actions
- m_pActBookmarksToggle = new KAction( i18n("&Toggle Bookmark"), "bookmark_add", CTRL+Key_B, this,
+ m_pActBookmarksToggle = new TDEAction( i18n("&Toggle Bookmark"), "bookmark_add", CTRL+Key_B, this,
SLOT(slotBookmarksToggle()), actionCollection(), "bookmark_toggle" );
- m_pActBookmarksPrev = new KAction( i18n("&Previous Bookmark"), "bookmark_prev", SHIFT+Key_F5, this,
+ m_pActBookmarksPrev = new TDEAction( i18n("&Previous Bookmark"), "bookmark_prev", SHIFT+Key_F5, this,
SLOT(slotBookmarksPrev()), actionCollection(), "bookmark_prev" );
- m_pActBookmarksNext = new KAction( i18n("&Next Bookmark"), "bookmark_next", Key_F5, this,
+ m_pActBookmarksNext = new TDEAction( i18n("&Next Bookmark"), "bookmark_next", Key_F5, this,
SLOT(slotBookmarksNext()), actionCollection(), "bookmark_next" );
// settings actions
- new KAction( i18n("&Configure KXMLEditor..."), "configure", 0, this,
+ new TDEAction( i18n("&Configure KXMLEditor..."), "configure", 0, this,
SLOT (slotConfigure()), actionCollection(), "configure" );
// path toolbar
m_pActPathCombo = new KXmlEditorComboAction( i18n("Path Bar"), 0, this,
SLOT(slotPathSelected(const TQString &)), actionCollection(), "path_combo" );
- new KAction( i18n("Clear Path Bar"), BarIcon("locationbar_erase", 16), 0, this,
+ new TDEAction( i18n("Clear Path Bar"), BarIcon("locationbar_erase", 16), 0, this,
SLOT(slotPathClear()), actionCollection(), "path_clear" );
TQLabel *m_locationLabel = new ToolbarLabel( i18n("Path: ") );
new KWidgetAction( m_locationLabel, i18n("Path: "), 0, this, 0, actionCollection(), "path_label" );
@@ -182,11 +182,11 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
else
{
// document specific actions here
- m_pActVersionEncoding = new KAction( i18n("&Version && Encoding..."), 0, 0, this, SLOT(slotActVersionEncoding()), actionCollection(), "xml_ins_spec_procins" );
- m_pActAttachSchema = new KAction(i18n("Attach Schema..."),0,0,this,SLOT(slotActAttachSchema()), actionCollection(), "xml_attach_schema");
- m_pActDetachSchema = new KAction(i18n("Detach Schema"),0,0,this,SLOT(slotActDetachSchema()), actionCollection(), "xml_detach_schema");
- m_pActAttachStylesheet = new KAction(i18n("Attach Stylesheet..."),0,0,this,SLOT(slotActAttachStylesheet()), actionCollection(), "xml_attach_stylesheet");
- m_pActDetachStylesheet = new KAction(i18n("Detach Stylesheet"),0,0,this,SLOT(slotActDetachStylesheet()), actionCollection(), "xml_detach_stylesheet");
+ m_pActVersionEncoding = new TDEAction( i18n("&Version && Encoding..."), 0, 0, this, SLOT(slotActVersionEncoding()), actionCollection(), "xml_ins_spec_procins" );
+ m_pActAttachSchema = new TDEAction(i18n("Attach Schema..."),0,0,this,SLOT(slotActAttachSchema()), actionCollection(), "xml_attach_schema");
+ m_pActDetachSchema = new TDEAction(i18n("Detach Schema"),0,0,this,SLOT(slotActDetachSchema()), actionCollection(), "xml_detach_schema");
+ m_pActAttachStylesheet = new TDEAction(i18n("Attach Stylesheet..."),0,0,this,SLOT(slotActAttachStylesheet()), actionCollection(), "xml_attach_stylesheet");
+ m_pActDetachStylesheet = new TDEAction(i18n("Detach Stylesheet"),0,0,this,SLOT(slotActDetachStylesheet()), actionCollection(), "xml_detach_stylesheet");
KStdAction::print( this, SLOT(slotActPrint()), actionCollection(), "print" );
@@ -206,25 +206,25 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
m_pActEditPaste = KStdAction::paste( this, SLOT(slotEditPaste()), actionCollection());
// Move node Up & Down
- m_pActXmlMoveNodeUp = new KAction( i18n("&Move Up"), "xml_move_item_up", CTRL+Key_U, this, SLOT(slotXmlMoveNodeUp()), actionCollection(), "xml_move_item_up" );
- m_pActXmlMoveNodeDown = new KAction( i18n("Move &Down"), "xml_move_item_down", CTRL+Key_D, this, SLOT(slotXmlMoveNodeDown()), actionCollection(), "xml_move_item_down" );
+ m_pActXmlMoveNodeUp = new TDEAction( i18n("&Move Up"), "xml_move_item_up", CTRL+Key_U, this, SLOT(slotXmlMoveNodeUp()), actionCollection(), "xml_move_item_up" );
+ m_pActXmlMoveNodeDown = new TDEAction( i18n("Move &Down"), "xml_move_item_down", CTRL+Key_D, this, SLOT(slotXmlMoveNodeDown()), actionCollection(), "xml_move_item_down" );
// Insert actions
- m_pActXmlElementInsert = new KAction( i18n("&Element..."), "xml_insert_element", CTRL+SHIFT+Key_E, this, SLOT(slotXmlElementInsert()), actionCollection(), "xml_ins_element" );
- m_pActXmlAttributesAdd = new KAction( i18n("&Attribute..."), "xml_insert_attribute", CTRL+SHIFT+Key_A, this, SLOT(slotXmlAttributesAdd()), actionCollection(), "xml_add_attribute" );
- m_pActInsertText = new KAction( i18n("&Text..."), "xml_text", CTRL+SHIFT+Key_T, this, SLOT(slotActInsertText()), actionCollection(), "insert_text" );
- m_pActInsertCDATA = new KAction( i18n("C&DATA..."), "xml_cdata", CTRL+SHIFT+Key_D, this, SLOT(slotActInsertCDATA()), actionCollection(), "insert_cdata" );
- m_pActInsertComment = new KAction( i18n("&Comment..."), "xml_comment", CTRL+SHIFT+Key_C, this, SLOT(slotActInsertComment()), actionCollection(), "insert_comment" );
- m_pActXmlProcInstrInsert = new KAction( i18n("&Processing Instruction..."), "xml_insert_procins", CTRL+SHIFT+Key_P, this, SLOT(slotXmlProcInstrInsert()), actionCollection(), "xml_ins_procins" );
+ m_pActXmlElementInsert = new TDEAction( i18n("&Element..."), "xml_insert_element", CTRL+SHIFT+Key_E, this, SLOT(slotXmlElementInsert()), actionCollection(), "xml_ins_element" );
+ m_pActXmlAttributesAdd = new TDEAction( i18n("&Attribute..."), "xml_insert_attribute", CTRL+SHIFT+Key_A, this, SLOT(slotXmlAttributesAdd()), actionCollection(), "xml_add_attribute" );
+ m_pActInsertText = new TDEAction( i18n("&Text..."), "xml_text", CTRL+SHIFT+Key_T, this, SLOT(slotActInsertText()), actionCollection(), "insert_text" );
+ m_pActInsertCDATA = new TDEAction( i18n("C&DATA..."), "xml_cdata", CTRL+SHIFT+Key_D, this, SLOT(slotActInsertCDATA()), actionCollection(), "insert_cdata" );
+ m_pActInsertComment = new TDEAction( i18n("&Comment..."), "xml_comment", CTRL+SHIFT+Key_C, this, SLOT(slotActInsertComment()), actionCollection(), "insert_comment" );
+ m_pActXmlProcInstrInsert = new TDEAction( i18n("&Processing Instruction..."), "xml_insert_procins", CTRL+SHIFT+Key_P, this, SLOT(slotXmlProcInstrInsert()), actionCollection(), "xml_ins_procins" );
// Edit node properties
- m_pActProperties = new KAction(i18n("&Properties..."),"edit",0,this,SLOT(slotActProperties()),actionCollection(),"edit_properties");
- m_pActEditRawXml = new KAction(i18n("Edit &raw XML..."), 0, 0, this, SLOT(slotActEditRawXml()),actionCollection(),"edit_as_raw_xml");
+ m_pActProperties = new TDEAction(i18n("&Properties..."),"edit",0,this,SLOT(slotActProperties()),actionCollection(),"edit_properties");
+ m_pActEditRawXml = new TDEAction(i18n("Edit &raw XML..."), 0, 0, this, SLOT(slotActEditRawXml()),actionCollection(),"edit_as_raw_xml");
// delete actions
- m_pActXmlAttributeDel = new KAction( i18n("&Delete"), "editdelete", 0, this, SLOT(slotXmlAttributeDel()), actionCollection(), "xml_del_attribute" );
- m_pActXmlAttributesDel = new KAction( i18n("Delete all Attributes..."), 0, 0, this, SLOT(slotXmlAttributesDel()), actionCollection(), "xml_del_attributes" );
- m_pActDelete = new KAction(i18n("&Delete"),"editdelete",0,this,SLOT(slotActDelete()),actionCollection(),"edit_delete");
+ m_pActXmlAttributeDel = new TDEAction( i18n("&Delete"), "editdelete", 0, this, SLOT(slotXmlAttributeDel()), actionCollection(), "xml_del_attribute" );
+ m_pActXmlAttributesDel = new TDEAction( i18n("Delete all Attributes..."), 0, 0, this, SLOT(slotXmlAttributesDel()), actionCollection(), "xml_del_attributes" );
+ m_pActDelete = new TDEAction(i18n("&Delete"),"editdelete",0,this,SLOT(slotActDelete()),actionCollection(),"edit_delete");
setXMLFile( "kxmleditorpartEditUI.rc", true );
@@ -276,7 +276,7 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
m_pViewProcInstr->setReadOnly( true );
m_pViewProcInstr->setWordWrap( TQTextEdit::NoWrap );
- connect( this, SIGNAL(started(KIO::Job*)), this, SLOT(started()) );
+ connect( this, SIGNAL(started(TDEIO::Job*)), this, SLOT(started()) );
connect( this, SIGNAL(completed()), this, SLOT(completed()) );
connect( this, SIGNAL(canceled(const TQString &)), this, SLOT(canceled()) );
@@ -343,7 +343,7 @@ KXMLEditorPart::KXMLEditorPart( bool fReadWrite, KXEDocument* pDocument, TQWidge
KXMLEditorPart::~KXMLEditorPart()
{
// saving splitter configuration
- KConfig *pConfig = instance()->config();
+ TDEConfig *pConfig = instance()->config();
pConfig->writeEntry( CONFIG_MAIN_SPLITTER_SIZES, pSplitter->sizes() );
if (m_pDCOPIface)
@@ -407,7 +407,7 @@ void KXMLEditorPart::setModified( bool bModified )
}
// get a handle on our Save action and make sure it is valid
- KAction *pActFileSave = actionCollection()->action(KStdAction::stdName(KStdAction::Save));
+ TDEAction *pActFileSave = actionCollection()->action(KStdAction::stdName(KStdAction::Save));
if(!pActFileSave)
return;
@@ -1719,13 +1719,13 @@ void KXMLEditorPart::slotContextMenuRequested( const TQString & szMenuName, cons
return;
}
- if ( ! pContainer->inherits("KPopupMenu") )
+ if ( ! pContainer->inherits("TDEPopupMenu") )
{
kdError() << "KXMLEditor " << k_funcinfo << " Wrong container widget" << endl;
return;
}
- KPopupMenu * pMenu = static_cast <KPopupMenu*> (pContainer);
+ TDEPopupMenu * pMenu = static_cast <TDEPopupMenu*> (pContainer);
pMenu->popup( pos );
}