[Uml-devel] branches/work/kmainwindow-decoupling-branch/kdesdk
Kevin Ottens
ervin at kde.org
Mon Apr 16 20:27:37 UTC 2007
SVN commit 654720 by ervin:
Port to KXmlGuiWindow.
M +3 -3 kapptemplate/kapp/app.cpp
M +2 -2 kapptemplate/kapp/app.h
M +3 -3 kapptemplate/kapp4/kapp4.cpp
M +2 -2 kapptemplate/kapp4/kapp4.h
M +1 -1 kate/app/kateviewspace.cpp
M +2 -2 kate/plugins/externaltools/kateexternaltools.cpp
M +1 -1 kate/plugins/externaltools/kateexternaltools.h
M +1 -1 kbabel/catalogmanager/catalogmanager.cpp
M +23 -23 kbabel/catalogmanager/catalogmanager.h
M +5 -5 kbabel/catalogmanager/main.cpp
M +2 -2 kbabel/kbabel/kbabel.cpp
M +1 -1 kbabel/kbabel/kbabel.h
M +2 -1 kbugbuster/gui/kbbmainwindow.cpp
M +2 -2 kbugbuster/gui/kbbmainwindow.h
M +1 -1 kcachegrind/kcachegrind/toplevel.cpp
M +2 -2 kcachegrind/kcachegrind/toplevel.h
M +11 -11 umbrello/umbrello/uml.cpp
M +3 -3 umbrello/umbrello/uml.h
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kapptemplate/kapp/app.cpp #654719:654720
@@ -31,7 +31,7 @@
#include <kaction.h>
${APP_NAME}::${APP_NAME}()
- : KMainWindow( ),
+ : KXmlGuiWindow( ),
m_view(new ${APP_NAME}View(this)),
m_printer(0)
{
@@ -39,7 +39,7 @@
// accept dnd
setAcceptDrops(true);
- // tell the KMainWindow that this is indeed the main widget
+ // tell the KXmlGuiWindow that this is indeed the main widget
setCentralWidget(m_view);
// then, setup our actions
@@ -144,7 +144,7 @@
// see if we can decode a URI.. if not, just ignore it
KUrl::List uriList = KUrl::List::fromMimeData( event->mimeData() );
- if ( !uriList.isEmpty() )
+ if ( !uriList.isEmpty() )
{
// okay, we have a URI.. process it
const KUrl &url = urls.first();
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kapptemplate/kapp/app.h #654719:654720
@@ -4,7 +4,7 @@
#define ${APP_NAME_UC}_H
#include <kapplication.h>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include <QDragEnterEvent>
#include <QDropEvent>
@@ -22,7 +22,7 @@
* @author $AUTHOR <$EMAIL>
* @version $APP_VERSION
*/
-class ${APP_NAME} : public KMainWindow
+class ${APP_NAME} : public KXmlGuiWindow
{
Q_OBJECT
public:
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kapptemplate/kapp4/kapp4.cpp #654719:654720
@@ -26,19 +26,19 @@
#include <kstandardaction.h>
${APP_NAME}::${APP_NAME}()
- : KMainWindow(),
+ : KXmlGuiWindow(),
m_view(new ${APP_NAME}View(this)),
m_printer(0)
{
// accept dnd
setAcceptDrops(true);
- // tell the KMainWindow that this is indeed the main widget
+ // tell the KXmlGuiWindow that this is indeed the main widget
setCentralWidget(m_view);
// then, setup our actions
setupActions();
- // a call to KMainWindow::createGUI() populates the GUI
+ // a call to KXmlGuiWindow::createGUI() populates the GUI
// with actions, using KXMLGUI
createGUI();
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kapptemplate/kapp4/kapp4.h #654719:654720
@@ -10,7 +10,7 @@
#include <kapplication.h>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include "${APP_NAME_LC}view.h"
#include "ui_prefs_base.h"
@@ -27,7 +27,7 @@
* @author ${AUTHOR} <${EMAIL}>
* @version ${APP_VERSION}
*/
-class ${APP_NAME} : public KMainWindow
+class ${APP_NAME} : public KXmlGuiWindow
{
Q_OBJECT
public:
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kate/app/kateviewspace.cpp #654719:654720
@@ -313,7 +313,7 @@
void KateVSStatusBar::showMenu()
{
- KMainWindow* mainWindow = static_cast<KMainWindow*>( window() );
+ KXmlGuiWindow* mainWindow = static_cast<KXmlGuiWindow*>( window() );
QMenu* menu = static_cast<QMenu*>( mainWindow->factory()->container("viewspace_popup", mainWindow ) );
if (menu)
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kate/plugins/externaltools/kateexternaltools.cpp #654719:654720
@@ -31,7 +31,7 @@
#include <KIconLoader>
#include <KMessageBox>
#include <KMimeTypeChooser>
-#include <KMainWindow>
+#include <KXmlGuiWindow>
#include <KConfig>
#include <KRun>
#include <KIconDialog>
@@ -205,7 +205,7 @@
// kDebug(13001)<<"KateExternalToolsCommand::exec: Could not get view widget"<<endl;
return false;
}
- KMainWindow *dmw = dynamic_cast<KMainWindow*>(wv->window());
+ KXmlGuiWindow *dmw = dynamic_cast<KXmlGuiWindow*>(wv->window());
if (!dmw)
{
// kDebug(13001)<<"KateExternalToolsCommand::exec: Could not get main window"<<endl;
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kate/plugins/externaltools/kateexternaltools.h #654719:654720
@@ -36,7 +36,7 @@
#include <kate/application.h>
#include <KActionMenu>
-#include <KMainWindow>
+#include <KXmlGuiWindow>
#include <KDialog>
#include <KWordMacroExpander>
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbabel/catalogmanager/catalogmanager.cpp #654719:654720
@@ -103,7 +103,7 @@
QStringList CatalogManager::_toBeSearched;
CatalogManager::CatalogManager( const QString& configFile )
- : KMainWindow( 0 )
+ : KXmlGuiWindow( 0 )
{
if ( configFile.isEmpty() )
_configFile = ProjectManager::defaultProjectName();
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbabel/catalogmanager/catalogmanager.h #654719:654720
@@ -45,7 +45,7 @@
#include <QLabel>
#include <kdeversion.h>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include <kdirwatch.h>
#include <q3ptrlist.h>
@@ -68,7 +68,7 @@
class ProjectDialog;
}
-class CatalogManager : public KMainWindow
+class CatalogManager : public KXmlGuiWindow
{
Q_OBJECT
public:
@@ -85,9 +85,9 @@
/** updates the file fileWithPath in the @ref CatalogManagerView */
void updateFile(const QString& fileWithPath);
void updateAfterSave(const QString& fileWithPath, KBabel::PoInfo &info);
-
+
CatalogManagerView *view();
-
+
void pause(bool flag) { if( _catalogManager ) _catalogManager->pause (flag); }
static QStringList _foundFilesList;
@@ -106,7 +106,7 @@
virtual void optionsPreferences();
virtual void optionsShowStatusbar(bool on);
virtual void dummySlot() {}
-
+
void projectNew();
void projectOpen();
void projectClose();
@@ -119,11 +119,11 @@
virtual void clearStatusProgressBar();
virtual void prepareStatusProgressBar(const QString& msg, int max);
virtual void prepareStatusProgressBar(int max);
-
+
virtual void setNumberOfFound( int toBeSent, int total );
virtual void decreaseNumberOfFound();
-
+
virtual void findNextFile();
protected slots:
virtual bool queryClose();
@@ -135,17 +135,17 @@
private:
void init();
-
+
void restoreView();
void saveView();
-
+
void saveSettings( const QString& configFile = QString() );
void setupActions();
void setupStatusBar();
-
+
bool startKBabel();
-
+
private slots:
/**
* calls @ref KBabel::open where as preferred windos _preferredWindow
@@ -162,23 +162,23 @@
*/
void openTemplate(const QByteArray& openFilename,const QByteArray& saveFileName, const QByteArray& package);
void openTemplateInNewWindow(const QByteArray& openFilename,const QByteArray& saveFileName, const QByteArray& package);
-
+
void markedSpellcheck();
void spellcheck();
-
+
void newToolbarConfig();
/** updates views and _settings variable */
void restoreSettings();
-
+
void enableActions();
void disableActions();
-
+
void enableActions(bool enable);
-
+
private:
CatalogManagerView* _catalogManager;
-
+
WId _preferredWindow;
bool _openNewWindow;
@@ -186,27 +186,27 @@
FindInFilesDialog* _findDialog;
FindInFilesDialog* _replaceDialog;
KBabel::ProjectDialog* _prefDialog;
-
+
/// update progress bar
QProgressBar* _progressBar;
QLabel* _progressLabel;
-
+
/// statusbar progress bar
QProgressBar* _statusProgressBar;
QLabel* _statusProgressLabel;
QLabel* _foundLabel;
int _foundToBeSent;
int _totalFound;
-
+
QTimer* _timerFind;
bool _searchStopped;
-
+
KBabel::CatManSettings _settings;
KBabel::MiscSettings _miscSettings;
-
+
/// options used in findNextFile
KBabel::FindOptions _findOptions;
-
+
/// project configuration file
QString _configFile;
KBabel::Project::Ptr _project;
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbabel/catalogmanager/main.cpp #654719:654720
@@ -30,7 +30,7 @@
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
-
+
**************************************************************************** */
#include "kbprojectmanager.h"
#include "catalogmanager.h"
@@ -50,7 +50,7 @@
#include <kmessagebox.h>
#include <kapplication.h>
#include <kwm.h>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include <qfile.h>
#include <qfileinfo.h>
@@ -80,9 +80,9 @@
if( _view )
{
_view->raise();
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_UNIX
KWM::activateWindow(_view->winId());
-#endif
+#endif
}
}
@@ -147,7 +147,7 @@
_view->setPreferredWindow( _preferredWindow );
_view->show();
_view->raise();
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_UNIX
KWM::activateWindow(_view->winId());
#endif
args->clear();
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbabel/kbabel/kbabel.cpp #654719:654720
@@ -138,7 +138,7 @@
};
KBabelMW::KBabelMW(const QString& projectFile_)
- : KMainWindow (), m_charselectorview(0)
+ : KXmlGuiWindow (), m_charselectorview(0)
{
QString projectFile( projectFile_ );
if ( projectFile.isEmpty() )
@@ -158,7 +158,7 @@
}
KBabelMW::KBabelMW(KBCatalog* catalog, const QString& projectFile_)
- : KMainWindow (), m_charselectorview(0)
+ : KXmlGuiWindow (), m_charselectorview(0)
{
QString projectFile( projectFile_ );
if ( projectFile.isEmpty() )
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbabel/kbabel/kbabel.h #654719:654720
@@ -78,7 +78,7 @@
* @short Main window class
* @author Matthias Kiefer <matthias.kiefer at gmx.de>
*/
-class KBabelMW : public KMainWindow
+class KBabelMW : public KXmlGuiWindow
{
Q_OBJECT
public:
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbugbuster/gui/kbbmainwindow.cpp #654719:654720
@@ -103,9 +103,10 @@
const QByteArray &initialComponent,
const QByteArray &initialBug,
QWidget * , const char * name )
- : KMainWindow( 0, name ), mPreferencesDialog( 0 ), mResponseViewer( 0 ),
+ : KXmlGuiWindow( 0 ), mPreferencesDialog( 0 ), mResponseViewer( 0 ),
mBugSourceViewer( 0 ), mPackageSelectDialog( 0 )
{
+ setObjectName( name );
BugSystem::self()->setCurrentServer( KBBPrefs::instance()->mCurrentServer );
m_statusLabel = new QLabel( i18n( "Welcome to <b>KBugBuster</b>." ), statusBar() );
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kbugbuster/gui/kbbmainwindow.h #654719:654720
@@ -18,7 +18,7 @@
#include <kapplication.h>
#include <kbookmarkmanager.h>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include <qmap.h>
//Added by qt3to4:
#include <QLabel>
@@ -47,7 +47,7 @@
/**
* @author Martijn Klingens
*/
-class KBBMainWindow : public KMainWindow, virtual public KBookmarkOwner
+class KBBMainWindow : public KXmlGuiWindow, virtual public KBookmarkOwner
{
Q_OBJECT
public:
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kcachegrind/kcachegrind/toplevel.cpp #654719:654720
@@ -83,7 +83,7 @@
#include <kconfiggroup.h>
TopLevel::TopLevel()
- : KMainWindow(0)
+ : KXmlGuiWindow(0)
{
QDBusConnection::sessionBus().registerObject("/KCachegrind", this, QDBusConnection::ExportScriptableSlots);
init();
--- branches/work/kmainwindow-decoupling-branch/kdesdk/kcachegrind/kcachegrind/toplevel.h #654719:654720
@@ -28,7 +28,7 @@
#include <QLabel>
#include <Q3PopupMenu>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include "traceitemview.h"
#include "tracedata.h"
@@ -55,7 +55,7 @@
class StackSelection;
class TraceFunction;
-class TopLevel : public KMainWindow
+class TopLevel : public KXmlGuiWindow
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.kcachegrind")
--- branches/work/kmainwindow-decoupling-branch/kdesdk/umbrello/umbrello/uml.cpp #654719:654720
@@ -99,7 +99,7 @@
return 0;
}
-UMLApp::UMLApp(QWidget* parent) : KMainWindow(parent) {
+UMLApp::UMLApp(QWidget* parent) : KXmlGuiWindow(parent) {
s_instance = this;
m_pDocWindow = 0;
m_config = KGlobal::config();
@@ -192,10 +192,10 @@
fileClose = KStandardAction::close(this, SLOT(slotFileClose()), actionCollection());
filePrint = KStandardAction::print(this, SLOT(slotFilePrint()), actionCollection());
fileQuit = KStandardAction::quit(this, SLOT(slotFileQuit()), actionCollection());
-
+
editUndo = m_pUndoStack->createUndoAction(actionCollection());
editRedo = m_pUndoStack->createRedoAction(actionCollection());
-
+
editCut = KStandardAction::cut(this, SLOT(slotEditCut()), actionCollection());
editCopy = KStandardAction::copy(this, SLOT(slotEditCopy()), actionCollection());
editPaste = KStandardAction::paste(this, SLOT(slotEditPaste()), actionCollection());
@@ -580,14 +580,14 @@
m_cmdHistoryDock->setWidget(m_pQUndoView);
m_pQUndoView->setCleanIcon(KIcon("filesave"));
m_pQUndoView->setStack(m_pUndoStack);
-
+
// Create the property viewer
//m_propertyDock = new QDockWidget(i18n("&Properties"), this);
//addDockWidget(Qt::LeftDockWidgetArea, m_propertyDock);
-
+
tabifyDockWidget(m_documentationDock, m_cmdHistoryDock);
//tabifyDockWidget(m_cmdHistoryDock, m_propertyDock);
-
+
QByteArray dockConfig;
KConfigGroup general( m_config, "General Options" );
general.readEntry("DockConfig", dockConfig);
@@ -1852,9 +1852,9 @@
if(m_pUndoStack->canUndo())
UMLApp::app()->enableUndo(true);
- else
+ else
UMLApp::app()->enableUndo(false);
-
+
UMLApp::app()->enableRedo(true);
}
@@ -1865,9 +1865,9 @@
if(m_pUndoStack->canRedo())
UMLApp::app()->enableRedo(true);
- else
+ else
UMLApp::app()->enableRedo(false);
-
+
UMLApp::app()->enableUndo(true);
}
@@ -1884,7 +1884,7 @@
void UMLApp::BeginMacro( const QString & text ) {
if(m_hasBegunMacro)
return;
-
+
m_hasBegunMacro = true;
m_pUndoStack->beginMacro(text);
--- branches/work/kmainwindow-decoupling-branch/kdesdk/umbrello/umbrello/uml.h #654719:654720
@@ -22,7 +22,7 @@
#include <QMenu>
#include <QUndoView>
-#include <kmainwindow.h>
+#include <kxmlguiwindow.h>
#include <kdeversion.h>
#include <kurl.h>
#include <ksharedconfig.h>
@@ -77,7 +77,7 @@
* Bugs and comments to uml-devel at lists.sf.net or http://bugs.kde.org
*/
-class UMLApp : public KMainWindow {
+class UMLApp : public KXmlGuiWindow {
Q_OBJECT
public:
/**
@@ -955,7 +955,7 @@
* Contains the property browser widget
*/
QDockWidget* m_propertyDock;
-
+
/**
* Documentation window.
*/
More information about the umbrello-devel
mailing list