[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Tue Apr 27 20:44:45 CEST 2010
SVN commit 1119739 by arwalker:
continue kst1kde4
M +27 -21 kst.cpp
M +13 -15 kst.h
M +6 -0 mainwindow.ui
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst.cpp #1119738:1119739
@@ -152,10 +152,10 @@
_stopping = false;
initDialogs();
+ initMenuBar();
+ initToolBar();
+ initStatusBar();
initActions();
- initStatusBar();
- initToolBar();
- initMenuBar();
initDocument();
// xxx KstDebug::self()->setHandler(_doc);
@@ -196,7 +196,7 @@
// xxx connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged()));
-// xxx QTimer::singleShot(0, this, SLOT(updateActions()));
+ QTimer::singleShot(0, this, SLOT(loadExtensions()));
show();
}
@@ -500,7 +500,7 @@
connect(_actionPause, SIGNAL(toggled(bool)), this, SLOT(updatePausedState(bool)));
connect(_actionDataWizard, SIGNAL(triggered()), this, SLOT(showDataWizard()));
- connect(_actionDialogChangeFile, SIGNAL(triggered()), this, SLOT(showChangeFile()));
+ connect(_actionDialogChangeFile, SIGNAL(triggered()), this, SLOT(showChangeFileDialog()));
connect(_actionDialogChooseColor, SIGNAL(triggered()), this, SLOT(showChooseColorDialog()));
connect(_actionDialogDifferentiateCurves, SIGNAL(triggered()), this, SLOT(showDifferentiateCurvesDialog()));
connect(_actionDialogChangeNpts, SIGNAL(triggered()), this, SLOT(showChangeNptsDialog()));
@@ -510,9 +510,9 @@
connect(_actionToolBar, SIGNAL(toggled(bool)), this, SLOT(slotViewToolBar()));
connect(_actionNewPlot, SIGNAL(triggered()), this, SLOT(newPlot()));
- connect(_actionTiedZoom, SLOT(toggled(bool)), this, SLOT(tieAll()));
- connect(_actionGroupMouse, SIGNAL(triggered()), this, SLOT(toggleMouseMode()));
-// xxx connect(_actionDataMode, SIGNAL(toggled(bool)), this SLOT(toggleDataMode()));
+ connect(_actionTiedZoom, SIGNAL(toggled(bool)), this, SLOT(tieAll()));
+ connect(_actionGroupMouse, SIGNAL(triggered(QAction*)), this, SLOT(toggleMouseMode()));
+ connect(_actionDataMode, SIGNAL(toggled(bool)), this, SLOT(toggleDataMode()));
/* xxx
fileKeyBindings = KStdAction::keyBindings(this, SLOT(slotConfigureKeys()), actionCollection());
@@ -675,13 +675,6 @@
}
-void KstApp::updateActions() {
-// xxx StatusBarAction->setChecked(statusBar()->isShown());
-// xxx QApplication::flushX();
- QTimer::singleShot(0, this, SLOT(loadExtensions()));
-}
-
-
void KstApp::slotConfigureKeys() {
/* xxx
KKeyDialog dlg(true, this);
@@ -1506,10 +1499,19 @@
void KstApp::slotViewStatusBar() {
if (_actionStatusBar->isChecked()) {
+ statusBar()->hide();
+ } else {
statusBar()->show();
updateStatusBarText();
+ }
+}
+
+
+void KstApp::slotViewToolBar() {
+ if (_actionToolBar->isChecked()) {
+ _toolBar->hide();
} else {
- statusBar()->hide();
+ _toolBar->show();
}
}
@@ -1760,18 +1762,22 @@
void KstApp::tieAll() {
+ Kst2DPlotList::const_iterator cit;
+ Kst2DPlotList::iterator it;
+ Kst2DPlotList pl;
int tied = 0;
- Kst2DPlotList pl = Kst2DPlot::globalPlotList();
- for (Kst2DPlotList::ConstIterator i = pl.begin(); i != pl.end(); ++i) {
- if ((*i)->isTied()) {
+
+ pl = Kst2DPlot::globalPlotList();
+ for (cit = pl.begin(); cit != pl.end(); ++cit) {
+ if ((*cit)->isTied()) {
++tied;
} else {
--tied;
}
}
- for (Kst2DPlotList::Iterator i = pl.begin(); i != pl.end(); ++i) {
- (*i)->setTied(tied <= 0);
+ for (it = pl.begin(); it != pl.end(); ++it) {
+ (*it)->setTied(tied <= 0);
}
paintAll(KstPainter::P_PAINT);
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst.h #1119738:1119739
@@ -174,17 +174,6 @@
void saveProperties(QSettings *cfg);
void readProperties(QSettings *cfg);
- private slots:
- void updateActions();
- void loadExtensions();
- void toggleDataMode();
- void toggleMouseMode();
- void slotSettingsChanged();
- void showContextMenu(QWidget *w, const QPoint& pos);
- void showContextMenu(const QPoint& pos);
- void delayedDocInit();
- void selectDataPlugin();
-
public slots:
void fromEnd();
void updatePausedState(bool);
@@ -219,6 +208,7 @@
void slotPaste();
void slotViewStatusBar();
+ void slotViewToolBar();
void updateStatusBarText();
void slotUpdateStatusMsg(const QString &msg);
void slotUpdateDataMsg(const QString &msg);
@@ -277,16 +267,24 @@
void removeSubWindow(QWidget *widget);
QMdiSubWindow *addSubWindow(QWidget *widget, Qt::WindowFlags windowFlags = 0 );
+ private slots:
+ void updateMemoryStatus();
+ void doDelayedOpens();
+ void loadExtensions();
+ void toggleDataMode();
+ void toggleMouseMode();
+ void slotSettingsChanged();
+ void showContextMenu(QWidget *w, const QPoint& pos);
+ void showContextMenu(const QPoint& pos);
+ void delayedDocInit();
+ void selectDataPlugin();
+
signals:
void timezoneChanged(const QString& tz, int utcOffset);
void settingsChanged();
void ELOGConfigure();
void ELOGSubmitEntry(const QString& strMessage);
- private slots:
- void updateMemoryStatus();
- void doDelayedOpens();
-
private:
static const QString& defaultTag;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/mainwindow.ui #1119738:1119739
@@ -934,11 +934,17 @@
</property>
</action>
<action name="_actionToolBar">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
<string>Hide &Toolbar</string>
</property>
</action>
<action name="_actionStatusBar">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
<property name="text">
<string>Hide St&atusbar</string>
</property>
More information about the Kst
mailing list