[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Thu May 31 05:00:44 CEST 2007
SVN commit 670014 by staikos:
stub out the debug dialog and connect the notifier to it.
M +2 -0 CMakeLists.txt
A debugdialog.cpp [License: GPL (v2+)]
A debugdialog.h [License: GPL (v2+)]
A debugdialog.ui branches/work/kst/portto4/kst/src/old_libkstapp/kstdebugdialog4.ui#668577
M +15 -0 mainwindow.cpp
M +5 -1 mainwindow.h
--- branches/work/kst/portto4/kst/src/libkstapp/CMakeLists.txt #670013:670014
@@ -4,6 +4,7 @@
applicationsettings.cpp
boxitem.cpp
datamanager.cpp
+ debugdialog.cpp
debugnotifier.cpp
document.cpp
ellipseitem.cpp
@@ -29,6 +30,7 @@
kde4_add_ui_files(kstapp_LIB_SRCS
datamanager.ui
+ debugdialog.ui
exportgraphicsdialog.ui
vectoreditordialog.ui
)
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #670013:670014
@@ -12,6 +12,7 @@
#include "mainwindow.h"
#include "boxitem.h"
#include "datamanager.h"
+#include "debugdialog.h"
#include "debugnotifier.h"
#include "document.h"
#include "ellipseitem.h"
@@ -344,6 +345,10 @@
_exportGraphicsAct->setStatusTip(tr("Export graphics to disk"));
connect(_exportGraphicsAct, SIGNAL(triggered()), this, SLOT(showExportGraphicsDialog()));
+ _debugDialogAct = new QAction(tr("&Debug Dialog..."), this);
+ _debugDialogAct->setStatusTip(tr("Show the Kst debugging dialog"));
+ connect(_debugDialogAct, SIGNAL(triggered()), this, SLOT(showDebugDialog()));
+
_aboutAct = new QAction(tr("&About"), this);
_aboutAct->setStatusTip(tr("Show Kst's About box"));
connect(_aboutAct, SIGNAL(triggered()), this, SLOT(about()));
@@ -387,6 +392,7 @@
menuBar()->addSeparator();
_helpMenu = menuBar()->addMenu(tr("&Help"));
+ _helpMenu->addAction(_debugDialogAct);
_helpMenu->addAction(_aboutAct);
_helpMenu->addAction(_aboutQtAct);
@@ -411,6 +417,7 @@
MemoryWidget *mw = new MemoryWidget(statusBar());
statusBar()->addPermanentWidget(mw);
DebugNotifier *dn = new DebugNotifier(statusBar());
+ connect(dn, SIGNAL(showDebugLog()), this, SLOT(showDebugDialog()));
statusBar()->addPermanentWidget(dn);
statusBar()->showMessage(tr("Ready"));
}
@@ -437,6 +444,14 @@
}
+void MainWindow::showDebugDialog() {
+ if (!_debugDialog) {
+ _debugDialog = new DebugDialog(this);
+ }
+ _debugDialog->show();
+}
+
+
void MainWindow::showExportGraphicsDialog() {
if (!_exportGraphics) {
_exportGraphics = new ExportGraphicsDialog(this);
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #670013:670014
@@ -23,6 +23,7 @@
namespace Kst {
class DataManager;
+class DebugDialog;
class Document;
class ExportGraphicsDialog;
class TabWidget;
@@ -43,6 +44,7 @@
public Q_SLOTS:
void showDataManager();
+ void showDebugDialog();
void showExportGraphicsDialog();
void showVectorEditor();
@@ -86,8 +88,9 @@
QUndoGroup *_undoGroup;
DataManager *_dataManager;
+ DebugDialog *_debugDialog;
+ ExportGraphicsDialog *_exportGraphics;
VectorEditorDialog *_vectorEditor;
- ExportGraphicsDialog *_exportGraphics;
QPointer<QProgressBar> _progressBar;
@@ -123,6 +126,7 @@
QAction *_dataManagerAct;
QAction *_vectorEditorAct;
QAction *_exportGraphicsAct;
+ QAction *_debugDialogAct;
QAction *_aboutAct;
QAction *_aboutQtAct;
};
More information about the Kst
mailing list