[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Thu Apr 22 03:48:10 CEST 2010
SVN commit 1117396 by arwalker:
continue kst1kde4
M +21 -38 kst.cpp
M +0 -60 kst.h
M +138 -11 mainwindow.ui
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst.cpp #1117395:1117396
@@ -126,6 +126,7 @@
_memoryBar = 0L;
_toolBar = 0L;
_menuBar = 0L;
+ _updateThread = 0L;
//
// create the mdi area...
@@ -147,13 +148,13 @@
_stopping = false;
// xxx config = kapp->config();
-/* xxx
+
initActions();
initStatusBar();
initToolBar();
initMenuBar();
initDocument();
-*/
+
// xxx setStandardToolBarMenuEnabled(true);
// xxx KstDebug::self()->setHandler(_doc);
// xxx setWindowTitle(_doc->title());
@@ -211,13 +212,14 @@
connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged()));
- QTimer::singleShot(0, this, SLOT(updateActions()));
+// xxx QTimer::singleShot(0, this, SLOT(updateActions()));
show();
}
KstApp::~KstApp() {
+/* xxx
destroyDebugNotifier();
delete _plotHolderWhileOpeningDocument;
@@ -248,6 +250,7 @@
delete qSettingsObject; // must be after cleanupForExit
qSettingsObject = 0L;
+*/
}
@@ -315,11 +318,19 @@
void KstApp::initActions() {
-/* xxx
+ connect(_actionOpen, SIGNAL(triggered()), this, SLOT(slotFileOpen()));
+// xxx connect(_actionOpenRecent, SIGNAL(triggered()), this, SLOT(slotFileOpenRecent(const QUrl &));
+ connect(_actionSave, SIGNAL(triggered()), this, SLOT(slotFileSave()));
+ connect(_actionSaveAs, SIGNAL(triggered()), this, SLOT(slotFileSaveAs()));
+ connect(_actionPrint, SIGNAL(triggered()), this, SLOT(slotFilePrint()));
connect(_actionNewTab, SIGNAL(triggered()), this, SLOT(slotFileNewWindow()));
- connect(_actionDialogGraphFile, SIGNAL(triggered()), this, SLOT(showGraphFileDialog()));
- connect(_actionVectorSave, SIGNAL(triggered()), _vectorSaveDialog, SLOT(show()));
+// xxx connect(_actionDialogGraphFile, SIGNAL(triggered()), this, SLOT(showGraphFileDialog()));
+// xxx connect(_actionVectorSave, SIGNAL(triggered()), _vectorSaveDialog, SLOT(show()));
+ connect(_actionQuit, SIGNAL(triggered()), this, SLOT(slotFileClose()));
+ connect(_actionCopy, SIGNAL(triggered()), this, SLOT(slotCopy()));
+ connect(_actionPaste, SIGNAL(triggered()), this, SLOT(slotPaste()));
+/* xxx
connect(_actionReload, SIGNAL(triggered()), this, SLOT(reload()));
connect(_actionManagerData, SIGNAL(triggered()), _dataManager, SLOT(show_I()));
connect(_actionManagerView, SIGNAL(triggered()), _viewManager, SLOT(show_I()));
@@ -345,18 +356,10 @@
connect(_actionSamplesFromEnd, SIGNAL(triggered()), this, SLOT(fromEnd()));
connect(_actionPause, SIGNAL(toggled(bool)), this, SLOT(updatePausedState(bool)));
-
+ connect(_actionStatusBar, SIGNAL(toggled(bool)), this, SLOT(slotViewStatusBar()));
+ connect(_actionToolBar, SIGNAL(toggled(bool)), this, SLOT(slotViewToolBar()));
*/
/* xxx
- fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- fileSave->setWhatsThis(QObject::tr("Save to current Kst plot file."));
-
- fileSaveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- fileSaveAs->setWhatsThis(QObject::tr("Save to new Kst plot file."));
-
- fileQuit = KStdAction::quit(this, SLOT(slotFileClose()), actionCollection());
- fileQuit->setWhatsThis(QObject::tr("Quit Kst."));
-
fileKeyBindings = KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
fileKeyBindings->setWhatsThis(QObject::tr("Bring up a dialog box\n"
@@ -366,26 +369,6 @@
filePreferences->setWhatsThis(QObject::tr("Bring up a dialog box\n"
"to configure Kst settings."));
- fileCopy = KStdAction::copy(this, SLOT(slotCopy()), actionCollection());
- fileCopy->setWhatsThis(QObject::tr("Copy cursor position or plots to the clipboard."));
-
- filePaste = KStdAction::paste(this, SLOT(slotPaste()), actionCollection());
- filePaste->setWhatsThis(QObject::tr("Paste plots from the clipboard."));
-
- filePrint = KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
- filePrint->setToolTip(QObject::tr("Print"));
- filePrint->setWhatsThis(QObject::tr("Print current display"));
-
- StatusBarAction = KStdAction::showStatusbar(this, SLOT(slotViewStatusBar()),
- actionCollection());
- StatusBarAction->setWhatsThis(QObject::tr("Toggle Statusbar"));
- connect(StatusBarAction, SIGNAL(activated()), this, SLOT(setSettingsDirty()));
-
- KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
-
- _recent = KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL &)), actionCollection());
- _recent->setWhatsThis(QObject::tr("Open a recently used Kst plot."));
-
_actionZoomXY = new KRadioAction(QObject::tr("XY Mouse &Zoom"), "kst_zoomxy",
KShortcut(Key_F2),
this, SLOT(toggleMouseMode()),
@@ -1549,14 +1532,12 @@
void KstApp::slotViewStatusBar() {
-/* xxx
if (_actionStatusBar->isChecked()) {
statusBar()->show();
updateStatusBarText();
} else {
statusBar()->hide();
}
-*/
}
@@ -2094,6 +2075,7 @@
void KstApp::updateDialogsForWindow() {
if (!_stopping) {
+/* xxx
KstCsdDialog::globalInstance()->updateWindow();
KstEqDialog::globalInstance()->updateWindow();
KstHsDialog::globalInstance()->updateWindow();
@@ -2103,6 +2085,7 @@
KstImageDialog::globalInstance()->updateWindow();
updateDataManager(false);
updateViewManager(false);
+*/
}
}
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst.h #1117395:1117396
@@ -313,66 +313,6 @@
KRecentFilesAction *_recent;
KRecentFilesAction *_fileOpenRecent;
*/
-/* xxx
- QAction *_actionStatusBar;
- QAction *_actionPause;
- QAction *_actionDataMode;
-
- QAction *_actionSamplesDown;
- QAction *_actionSamplesUp;
- QAction *_actionSamplesFromEnd;
- QAction *_actionTiedZoom;
- QAction *_actionNewPlot;
-
- QAction *_actionDialogPlot;
- QAction *_actionDialogCurveD;
- QAction *_actionDialogViewScalars;
- QAction *_actionDialogViewStrings;
- QAction *_actionDialogViewVectors;
- QAction *_actionDialogViewMatrices;
- QAction *_actionDialogViewFits;
- QAction *_actionDialogDebug;
- QAction *_actionDialogChangeFile;
- QAction *_actionDialogChooseColor;
- QAction *_actionDialogDifferentiateCurves;
- QAction *_actionDialogChangeNpts;
-
- QAction *_actionDataWizard;
-
- QAction *_actionManagerPluginr;
- QAction *_actionManagerExtension;
-
- QAction *_actionEventMonitor;
-
- QAction *_actionFileNew;
- QAction *_actionFilePrint;
- QAction *_actionFileOpenNew;
- QAction *_actionFileOpen;
- QAction *_actionFileSave;
- QAction *_actionFileSaveAs;
- QAction *_actionFileQuit;
- QAction *_actionFileKeyBindings;
- QAction *_actionFilePreferences;
- QAction *_actionFileCopy;
- QAction *_actionFilePaste;
-
- QActionGroup *_actionGroupZoom;
- QAction *_actionZoomXY;
- QAction *_actionZoomX;
- QAction *_actionZoomY;
- QAction *_actionGfx;
- QAction *_actionLayout;
-
- QActionGroup *_actionGroupGfx;
- QAction *_actionGfxLine;
- QAction *_actionGfxRectangle;
- QAction *_actionGfxEllipse;
- QAction *_actionGfxLabel;
- QAction *_actionGfxPicture;
- QAction *_actionGfx2DPlot;
- QAction *_actionGfxArrow;
- QAction *_actionGfxLegend;
-*/
StatusLabel *_readyBar;
StatusLabel *_memoryBar;
StatusLabel *_dataBar;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/mainwindow.ui #1117395:1117396
@@ -27,15 +27,27 @@
<property name="title">
<string>&File</string>
</property>
+ <addaction name="_actionOpen"/>
+ <addaction name="_actionOpenRecent"/>
+ <addaction name="separator"/>
+ <addaction name="_actionSave"/>
+ <addaction name="_actionSaveAs"/>
+ <addaction name="separator"/>
+ <addaction name="_actionPrint"/>
+ <addaction name="separator"/>
<addaction name="_actionNewTab"/>
<addaction name="_actionDialogGraphFile"/>
<addaction name="_actionVectorSave"/>
<addaction name="_actionSaveData"/>
+ <addaction name="separator"/>
+ <addaction name="_actionQuit"/>
</widget>
<widget class="QMenu" name="_menuEdit">
<property name="title">
<string>&Edit</string>
</property>
+ <addaction name="_actionCopy"/>
+ <addaction name="_actionPaste"/>
</widget>
<widget class="QMenu" name="_menuData">
<property name="title">
@@ -83,7 +95,7 @@
<addaction name="_actionDialogChooseColor"/>
<addaction name="_actionDialogDifferentiateCurves"/>
</widget>
- <widget class="QMenu" name="menu_Plots">
+ <widget class="QMenu" name="_menuPlots">
<property name="title">
<string>&Plots</string>
</property>
@@ -111,14 +123,18 @@
<addaction name="separator"/>
<addaction name="_actionDataMode"/>
</widget>
- <widget class="QMenu" name="menu_Settings">
+ <widget class="QMenu" name="_menuSettings">
<property name="title">
<string>&Settings</string>
</property>
<addaction name="separator"/>
<addaction name="_actionManagerExtension"/>
+ <addaction name="separator"/>
+ <addaction name="_actionToolBar"/>
+ <addaction name="_actionStatusBar"/>
+ <addaction name="separator"/>
</widget>
- <widget class="QMenu" name="menu_help">
+ <widget class="QMenu" name="_menuHelp">
<property name="title">
<string>&Help</string>
</property>
@@ -129,9 +145,9 @@
<addaction name="_menuData"/>
<addaction name="_menuRange"/>
<addaction name="_menuTools"/>
- <addaction name="menu_Plots"/>
- <addaction name="menu_Settings"/>
- <addaction name="menu_help"/>
+ <addaction name="_menuPlots"/>
+ <addaction name="_menuSettings"/>
+ <addaction name="_menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="_actionNewTab">
@@ -145,11 +161,6 @@
<string>Create a new tab.</string>
</property>
</action>
- <action name="actionSave_vectors">
- <property name="text">
- <string>Save vectors...</string>
- </property>
- </action>
<action name="_actionDialogGraphFile">
<property name="text">
<string>Export to Graphics File...</string>
@@ -512,6 +523,9 @@
</property>
</action>
<action name="_actionZoomXY">
+ <property name="checkable">
+ <bool>false</bool>
+ </property>
<property name="text">
<string>XY Mouse &Zoom</string>
</property>
@@ -599,6 +613,119 @@
<string>Bring up a dialog to display debugging information.</string>
</property>
</action>
+ <action name="_actionOpen">
+ <property name="text">
+ <string>&Open...</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+O</string>
+ </property>
+ </action>
+ <action name="_actionOpenRecent">
+ <property name="text">
+ <string>Open &Recent</string>
+ </property>
+ <property name="statusTip">
+ <string>Open a recently used Kst plot.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Open a recently used Kst plot.</string>
+ </property>
+ </action>
+ <action name="_actionSave">
+ <property name="text">
+ <string>&Save</string>
+ </property>
+ <property name="statusTip">
+ <string>Save to current Kst plot file.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Save to current Kst plot file.</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+S</string>
+ </property>
+ </action>
+ <action name="_actionSaveAs">
+ <property name="text">
+ <string>Save &As</string>
+ </property>
+ <property name="statusTip">
+ <string>Save to new Kst plot file.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Save to new Kst plot file.</string>
+ </property>
+ </action>
+ <action name="_actionPrint">
+ <property name="text">
+ <string>&Print...</string>
+ </property>
+ <property name="statusTip">
+ <string>Print</string>
+ </property>
+ <property name="whatsThis">
+ <string>Print current display.</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+P</string>
+ </property>
+ </action>
+ <action name="_actionQuit">
+ <property name="text">
+ <string>&Quit</string>
+ </property>
+ <property name="statusTip">
+ <string>Quit Kst.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Quit Kst.</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+Q</string>
+ </property>
+ </action>
+ <action name="_actionCopy">
+ <property name="text">
+ <string>Copy</string>
+ </property>
+ <property name="statusTip">
+ <string>Copy cursor position or plots to the clipboard.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Copy cursor position or plots to the clipboard.</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+C</string>
+ </property>
+ </action>
+ <action name="_actionPaste">
+ <property name="text">
+ <string>Paste</string>
+ </property>
+ <property name="statusTip">
+ <string>Paste plots from the clipboard.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Paste plots from the clipboard.</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+V</string>
+ </property>
+ </action>
+ <action name="_actionToolBar">
+ <property name="text">
+ <string>Hide &Toolbar</string>
+ </property>
+ </action>
+ <action name="_actionStatusBar">
+ <property name="text">
+ <string>Hide St&atusbar</string>
+ </property>
+ <property name="whatsThis">
+ <string>Toggle Statusbar</string>
+ </property>
+ </action>
</widget>
<resources/>
<connections/>
More information about the Kst
mailing list