From ee52bb567f32fefdcf06e083c76562ea40ccf174 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:12:18 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kig/ChangeLog | 2 +- kig/filters/drgeo-filter-chooserbase.ui | 2 +- kig/filters/exporter.cc | 14 ++++----- kig/filters/exporter.h | 4 +-- kig/kig/kig.cpp | 2 +- kig/kig/kig.h | 10 +++---- kig/kig/kig_part.cpp | 38 ++++++++++++------------- kig/kig/kig_part.h | 50 ++++++++++++++++----------------- kig/misc/guiaction.cc | 2 +- kig/misc/guiaction.h | 2 +- kig/modes/popup.cc | 4 +-- kig/modes/popup.h | 4 +-- kig/modes/typesdialog.cpp | 4 +-- kig/modes/typesdialogbase.ui | 2 +- kig/scripting/newscriptwizard.cc | 16 +++++------ 15 files changed, 78 insertions(+), 78 deletions(-) (limited to 'kig') diff --git a/kig/ChangeLog b/kig/ChangeLog index 48a0a4e5..ddbb1309 100644 --- a/kig/ChangeLog +++ b/kig/ChangeLog @@ -666,7 +666,7 @@ * Clean the status bar text on time in ConstructMode and TestConstructMode. - * Make SetCoordinateSystemAction into a KSelectAction, so the user + * Make SetCoordinateSystemAction into a TDESelectAction, so the user can see what kind of coordinate system he's currently using. * Some tuning of the UI: move Transformations and Tests menu into diff --git a/kig/filters/drgeo-filter-chooserbase.ui b/kig/filters/drgeo-filter-chooserbase.ui index 2473fd12..d173a46e 100644 --- a/kig/filters/drgeo-filter-chooserbase.ui +++ b/kig/filters/drgeo-filter-chooserbase.ui @@ -51,7 +51,7 @@ Please select which to import: 6 - + FigureListBox diff --git a/kig/filters/exporter.cc b/kig/filters/exporter.cc index 77ce7266..005342de 100644 --- a/kig/filters/exporter.cc +++ b/kig/filters/exporter.cc @@ -58,20 +58,20 @@ static bool operator<( const TQColor& a, const TQColor& b ) } class ExporterAction - : public KAction + : public TDEAction { KigExporter* mexp; const KigPart* mdoc; KigWidget* mw; public: ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ); + TDEActionCollection* parent, KigExporter* exp ); void slotActivated(); }; ExporterAction::ExporterAction( const KigPart* doc, KigWidget* w, - KActionCollection* parent, KigExporter* exp ) - : KAction( exp->menuEntryName(), KShortcut(), 0, 0, parent ), + TDEActionCollection* parent, KigExporter* exp ) + : TDEAction( exp->menuEntryName(), TDEShortcut(), 0, 0, parent ), mexp( exp ), mdoc( doc ), mw( w ) { TQString iconstr = exp->menuIcon(); @@ -190,10 +190,10 @@ KigExportManager::~KigExportManager() } void KigExportManager::addMenuAction( const KigPart* doc, KigWidget* w, - KActionCollection* coll ) + TDEActionCollection* coll ) { - KActionMenu* m = - new KActionMenu( i18n( "&Export To" ), coll, "file_export" ); + TDEActionMenu* m = + new TDEActionMenu( i18n( "&Export To" ), coll, "file_export" ); for ( uint i = 0; i < mexporters.size(); ++i ) m->insert( new ExporterAction( doc, w, coll, mexporters[i] ) ); } diff --git a/kig/filters/exporter.h b/kig/filters/exporter.h index 8fc210a1..b4d9f56b 100644 --- a/kig/filters/exporter.h +++ b/kig/filters/exporter.h @@ -24,7 +24,7 @@ class TQString; class KigDocument; class KigPart; class KigWidget; -class KActionCollection; +class TDEActionCollection; class KigExporter; @@ -36,7 +36,7 @@ class KigExportManager public: static KigExportManager* instance(); void addMenuAction( const KigPart* doc, KigWidget* w, - KActionCollection* coll ); + TDEActionCollection* coll ); }; /** diff --git a/kig/kig/kig.cpp b/kig/kig/kig.cpp index b0eda780..79620ebc 100644 --- a/kig/kig/kig.cpp +++ b/kig/kig/kig.cpp @@ -169,7 +169,7 @@ void Kig::fileNew() void Kig::openURL(const KURL& url) { - // Called for opening a file by either the KRecentFilesAction or our + // Called for opening a file by either the TDERecentFilesAction or our // own fileOpen() method. // if we are in the "initial state", we open the url in this window: if ( m_part->url().isEmpty() && ! m_part->isModified() ) diff --git a/kig/kig/kig.h b/kig/kig/kig.h index 0df1ad43..50e1e9ef 100644 --- a/kig/kig/kig.h +++ b/kig/kig/kig.h @@ -39,8 +39,8 @@ #include #include -class KToggleAction; -class KRecentFilesAction; +class TDEToggleAction; +class TDERecentFilesAction; /** * This is the application "Shell". It has a menubar, toolbar, and @@ -136,10 +136,10 @@ class Kig : public KParts::MainWindow KParts::ReadWritePart *m_part; //#ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - KToggleAction *m_toolbarAction; - KToggleAction *m_statusbarAction; + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; //#endif - KRecentFilesAction *m_recentFilesAction; + TDERecentFilesAction *m_recentFilesAction; TDEConfig* config; diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp index ef7fa470..3e85d0b4 100644 --- a/kig/kig/kig_part.cpp +++ b/kig/kig/kig_part.cpp @@ -83,17 +83,17 @@ TDEAboutData* KigPart::createAboutData() } class SetCoordinateSystemAction - : public KSelectAction + : public TDESelectAction { KigPart& md; public: - SetCoordinateSystemAction( KigPart& d, KActionCollection* parent ); + SetCoordinateSystemAction( KigPart& d, TDEActionCollection* parent ); void slotActivated( int index ); }; SetCoordinateSystemAction::SetCoordinateSystemAction( - KigPart& d, KActionCollection* parent ) - : KSelectAction( i18n( "&Set Coordinate System" ), 0, parent, "settings_set_coordinate_system" ), + KigPart& d, TDEActionCollection* parent ) + : TDESelectAction( i18n( "&Set Coordinate System" ), 0, parent, "settings_set_coordinate_system" ), md( d ) { setItems( CoordinateSystemFactory::names() ); @@ -218,7 +218,7 @@ void KigPart::setupActions() this, TQT_SLOT( slotSelectAll() ), actionCollection() ); aDeselectAll = KStdAction::deselect( this, TQT_SLOT( slotDeselectAll() ), actionCollection() ); - aInvertSelection = new KAction( + aInvertSelection = new TDEAction( i18n( "Invert Selection" ), "", 0, this, TQT_SLOT( slotInvertSelection() ), actionCollection(), "edit_invert_selection" ); @@ -227,30 +227,30 @@ void KigPart::setupActions() KIconLoader* l = instance()->iconLoader(); TQPixmap tmp; - aDeleteObjects = new KAction( + aDeleteObjects = new TDEAction( i18n("&Delete Objects"), "editdelete", Key_Delete, this, TQT_SLOT(deleteObjects()), actionCollection(), "delete_objects"); aDeleteObjects->setToolTip(i18n("Delete the selected objects")); - aCancelConstruction = new KAction( + aCancelConstruction = new TDEAction( i18n("Cancel Construction"), "stop", Key_Escape, this, TQT_SLOT(cancelConstruction()), actionCollection(), "cancel_construction"); aCancelConstruction->setToolTip( i18n("Cancel the construction of the object being constructed")); aCancelConstruction->setEnabled(false); - aShowHidden = new KAction( + aShowHidden = new TDEAction( i18n("U&nhide All"), 0, this, TQT_SLOT( showHidden() ), actionCollection(), "edit_unhide_all"); aShowHidden->setToolTip(i18n("Show all hidden objects")); aShowHidden->setEnabled( true ); - aNewMacro = new KAction( + aNewMacro = new TDEAction( i18n("&New Macro..."), "gear", 0, this, TQT_SLOT(newMacro()), actionCollection(), "macro_action"); aNewMacro->setToolTip(i18n("Define a new macro")); - aConfigureTypes = new KAction( + aConfigureTypes = new TDEAction( i18n("Manage &Types..."), 0, this, TQT_SLOT(editTypes()), actionCollection(), "types_edit"); aConfigureTypes->setToolTip(i18n("Manage macro types.")); @@ -258,7 +258,7 @@ void KigPart::setupActions() KigExportManager::instance()->addMenuAction( this, m_widget->realWidget(), actionCollection() ); - KAction* a = KStdAction::zoomIn( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomIn() ), + TDEAction* a = KStdAction::zoomIn( TQT_TQOBJECT(m_widget), TQT_SLOT( slotZoomIn() ), actionCollection() ); a->setToolTip( i18n( "Zoom in on the document" ) ); a->setWhatsThis( i18n( "Zoom in on the document" ) ); @@ -284,7 +284,7 @@ void KigPart::setupActions() a = KStdAction::fullScreen( TQT_TQOBJECT(m_widget), TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" ); #else tmp = l->loadIcon( "window_fullscreen", KIcon::Toolbar ); - a = new KAction( + a = new TDEAction( i18n( "Full Screen" ), tmp, CTRL+SHIFT+Key_F, m_widget, TQT_SLOT( toggleFullScreen() ), actionCollection(), "fullscreen" ); @@ -293,37 +293,37 @@ void KigPart::setupActions() a->setWhatsThis( i18n( "View this document full-screen." ) ); // TODO: an icon for this.. - a = new KAction( + a = new TDEAction( i18n( "&Select Shown Area" ), "viewmagfit", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomRect() ), actionCollection(), "view_select_shown_rect" ); a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); - a = new KAction( + a = new TDEAction( i18n( "S&elect Zoom Area" ), "viewmag", 0, TQT_TQOBJECT(m_widget), TQT_SLOT( zoomArea() ), actionCollection(), "view_zoom_area" ); // a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); // a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); - aToggleGrid = new KToggleAction( + aToggleGrid = new TDEToggleAction( i18n( "Show &Grid" ), 0, this, TQT_SLOT( toggleGrid() ), actionCollection(), "settings_show_grid" ); aToggleGrid->setToolTip( i18n( "Show or hide the grid." ) ); aToggleGrid->setChecked( true ); - aToggleAxes = new KToggleAction( + aToggleAxes = new TDEToggleAction( i18n( "Show &Axes" ), 0, this, TQT_SLOT( toggleAxes() ), actionCollection(), "settings_show_axes" ); aToggleAxes->setToolTip( i18n( "Show or hide the axes." ) ); aToggleAxes->setChecked( true ); - aToggleNightVision = new KToggleAction( + aToggleNightVision = new TDEToggleAction( i18n( "Wear Infrared Glasses" ), 0, this, TQT_SLOT( toggleNightVision() ), actionCollection(), "settings_toggle_nightvision" ); aToggleNightVision->setToolTip( i18n( "Enable/Disable hidden objects visibility." ) ); aToggleNightVision->setChecked( false ); - // select coordinate system KActionMenu.. + // select coordinate system TDEActionMenu.. aCoordSystem = new SetCoordinateSystemAction( *this, actionCollection() ); } @@ -563,7 +563,7 @@ void KigPart::delObjects( const std::vector& os ) void KigPart::enableConstructActions( bool enabled ) { for_each( aActions.begin(), aActions.end(), - bind2nd( mem_fun( &KAction::setEnabled ), + bind2nd( mem_fun( &TDEAction::setEnabled ), enabled ) ); } diff --git a/kig/kig/kig_part.h b/kig/kig/kig_part.h index 2a1c6506..140c56f6 100644 --- a/kig/kig/kig_part.h +++ b/kig/kig/kig_part.h @@ -29,12 +29,12 @@ #include "../objects/common.h" class TDEAboutData; -class KActionMenu; +class TDEActionMenu; class KCommandHistory; class KPrinter; -class KSelectAction; -class KToolBar; -class KToggleAction; +class TDESelectAction; +class TDEToolBar; +class TDEToggleAction; class KURL; class TQWidget; @@ -175,7 +175,7 @@ protected: protected: KigMode* mMode; - KSelectAction* aCoordSystem; + TDESelectAction* aCoordSystem; /** * the command history @@ -192,26 +192,26 @@ public: // the previous mode. Enabling/disabling is done at the same time, // of course.. // some MenuActions.. - TQPtrList aMNewSegment; - TQPtrList aMNewPoint; - TQPtrList aMNewCircle; - TQPtrList aMNewLine; - TQPtrList aMNewOther; - TQPtrList aMNewAll; - TQPtrList aMNewConic; - - - KAction* aCancelConstruction; - KAction* aSelectAll; - KAction* aDeselectAll; - KAction* aInvertSelection; - KAction* aDeleteObjects; - KAction* aNewMacro; - KAction* aShowHidden; - KAction* aConfigureTypes; - KToggleAction* aToggleGrid; - KToggleAction* aToggleAxes; - KToggleAction* aToggleNightVision; + TQPtrList aMNewSegment; + TQPtrList aMNewPoint; + TQPtrList aMNewCircle; + TQPtrList aMNewLine; + TQPtrList aMNewOther; + TQPtrList aMNewAll; + TQPtrList aMNewConic; + + + TDEAction* aCancelConstruction; + TDEAction* aSelectAll; + TDEAction* aDeselectAll; + TDEAction* aInvertSelection; + TDEAction* aDeleteObjects; + TDEAction* aNewMacro; + TDEAction* aShowHidden; + TDEAction* aConfigureTypes; + TDEToggleAction* aToggleGrid; + TDEToggleAction* aToggleAxes; + TDEToggleAction* aToggleNightVision; std::vector aActions; /** diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc index d42b7ca4..a4fdb0c9 100644 --- a/kig/misc/guiaction.cc +++ b/kig/misc/guiaction.cc @@ -82,7 +82,7 @@ void ConstructibleAction::act( KigPart& d ) KigGUIAction::KigGUIAction( GUIAction* act, KigPart& doc, TQObject* parent ) - : KAction( act->descriptiveName(), + : TDEAction( act->descriptiveName(), doc.instance()->iconLoader()->loadIcon( act->iconFileName(), KIcon::Toolbar, 0, KIcon::DefaultState, 0L, true ), act->shortcut(), diff --git a/kig/misc/guiaction.h b/kig/misc/guiaction.h index 05ffb994..6187dbe3 100644 --- a/kig/misc/guiaction.h +++ b/kig/misc/guiaction.h @@ -32,7 +32,7 @@ class GUIAction; class KigPart; class KigGUIAction - : public KAction + : public TDEAction { Q_OBJECT diff --git a/kig/modes/popup.cc b/kig/modes/popup.cc index ba778f43..b55adafb 100644 --- a/kig/modes/popup.cc +++ b/kig/modes/popup.cc @@ -185,7 +185,7 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, NormalMode& mode, const std::vector& objs, const TQPoint& plc ) - : KPopupMenu( &view ), mplc( plc ), mpart( part ), mview( view ), mobjs( objs ), + : TDEPopupMenu( &view ), mplc( plc ), mpart( part ), mview( view ), mobjs( objs ), mmode( mode ), monlylabels( false ) { bool empty = objs.empty(); @@ -1177,7 +1177,7 @@ int ObjectChooserPopup::getObjectFromList( const TQPoint& p, KigWidget* w, ObjectChooserPopup::ObjectChooserPopup( const TQPoint& p, KigWidget& view, const std::vector& objs ) - : KPopupMenu(), mplc( p ), mview( view ), mobjs( objs ), mselected( -1 ) + : TDEPopupMenu(), mplc( p ), mview( view ), mobjs( objs ), mselected( -1 ) { for ( uint i = 0; i < mobjs.size(); i++ ) { diff --git a/kig/modes/popup.h b/kig/modes/popup.h index 3485bbea..d1fb89d5 100644 --- a/kig/modes/popup.h +++ b/kig/modes/popup.h @@ -44,7 +44,7 @@ class ObjectHolder; * PopupActionProviders are disabled, and some others enabled.. */ class NormalModePopupObjects - : public KPopupMenu + : public TDEPopupMenu { Q_OBJECT @@ -115,7 +115,7 @@ private: * You can't use this class directly, but these's a convenience method. */ class ObjectChooserPopup - : public KPopupMenu + : public TDEPopupMenu { Q_OBJECT diff --git a/kig/modes/typesdialog.cpp b/kig/modes/typesdialog.cpp index db30d652..917a46fc 100644 --- a/kig/modes/typesdialog.cpp +++ b/kig/modes/typesdialog.cpp @@ -50,11 +50,11 @@ class MacroListElement { Macro* macro; public: - MacroListElement( KListView* lv, Macro* m ); + MacroListElement( TDEListView* lv, Macro* m ); Macro* getMacro() const { return macro; } }; -MacroListElement::MacroListElement( KListView* lv, Macro* m ) +MacroListElement::MacroListElement( TDEListView* lv, Macro* m ) : TQListViewItem( lv, TQString(), m->action->descriptiveName(), m->action->description() ), macro( m ) { diff --git a/kig/modes/typesdialogbase.ui b/kig/modes/typesdialogbase.ui index 90216532..0a74d56d 100644 --- a/kig/modes/typesdialogbase.ui +++ b/kig/modes/typesdialogbase.ui @@ -36,7 +36,7 @@ unnamed - + Icon diff --git a/kig/scripting/newscriptwizard.cc b/kig/scripting/newscriptwizard.cc index 67a0b9a4..c883a159 100644 --- a/kig/scripting/newscriptwizard.cc +++ b/kig/scripting/newscriptwizard.cc @@ -83,7 +83,7 @@ NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode ) hli = dynamic_cast( document ); // displaying the left border with line numbers - KToggleAction *a = dynamic_cast( editor->actionCollection()->action("view_line_numbers") ); + TDEToggleAction *a = dynamic_cast( editor->actionCollection()->action("view_line_numbers") ); a->activate(); // saving the state of dynamic word wrap and disabling it @@ -94,14 +94,14 @@ NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode ) noHlStyle = hli->hlMode(); // creating the popup menu - KPopupMenu* pm = new KPopupMenu( editor ); + TDEPopupMenu* pm = new TDEPopupMenu( editor ); // creating the actions for the code editor... - KActionCollection* ac = new KActionCollection( editor ); - KAction* undoAction = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT( slotUndo() ), ac ); - KAction* redoAction = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT( slotRedo() ), ac ); - KAction* cutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotCut() ), ac ); - KAction* copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotCopy() ), ac ); - KAction* pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotPaste() ), ac ); + TDEActionCollection* ac = new TDEActionCollection( editor ); + TDEAction* undoAction = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT( slotUndo() ), ac ); + TDEAction* redoAction = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT( slotRedo() ), ac ); + TDEAction* cutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( slotCut() ), ac ); + TDEAction* copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( slotCopy() ), ac ); + TDEAction* pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( slotPaste() ), ac ); // ... and plugging them into the popup menu (to build it, of course :) ) undoAction->plug( pm ); redoAction->plug( pm ); -- cgit v1.2.3