[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Wed Jun 16 07:31:40 CEST 2004
CVS commit by staikos:
tied zoom action is implemented, but not as a toggle. It presently just
enables tied zoom for all plots in the active window.
M +19 -6 kst.cpp 1.153
M +3 -1 kst.h 1.74
--- kdeextragear-2/kst/kst/kst.cpp #1.152:1.153
@@ -612,4 +612,12 @@ void KstApp::initActions() {
_reloadAction->setWhatsThis(i18n("Reload the data from file."));
+ _tiedZoomAction = new KAction(i18n("&Tied Zoom"),"kst_zoomtie",0,
+ this, SLOT(tieAll()),
+ actionCollection(), "zoomtie_action");
+ _tiedZoomAction->setToolTip(i18n("Enable tied zoom"));
+ _tiedZoomAction->setWhatsThis(i18n("Apply zoom actions to all plots\n"
+ "(not just the active one)."));
+
+
createGUI(0L);
}
@@ -1156,12 +1164,17 @@ void KstApp::slotTimer() {
*/
+void KstApp::tieAll() {
+ KstViewWindow *w = dynamic_cast<KstViewWindow*>(activeWindow());
+ if (w) {
+ KstTopLevelViewPtr vp = w->view();
+ vp->forEachChild(&Kst2DPlot::setTied, true);
+ }
+}
+
void KstApp::showPlotDialog() {
- KMdiChildView* pWindow = activeWindow();
- QString strWindow;
- QString strPlot;
+ KMdiChildView *pWindow = activeWindow();
if (plotDialog->isHidden() && pWindow) {
- strWindow = pWindow->caption();
- plotDialog->show_I(strWindow,strPlot);
+ plotDialog->show_I(pWindow->caption(), QString::null);
} else {
plotDialog->show_I();
@@ -1170,5 +1183,5 @@ void KstApp::showPlotDialog() {
void KstApp::showPlotDialog(const QString& strWindow, const QString& strPlot) {
- plotDialog->show_I(strWindow,strPlot);
+ plotDialog->show_I(strWindow, strPlot);
}
--- kdeextragear-2/kst/kst/kst.h #1.73:1.74
@@ -174,4 +174,6 @@ class KstApp : public KMdiMainFrm {
public slots:
+ void tieAll();
+
void forceUpdate();
@@ -366,5 +368,5 @@ class KstApp : public KMdiMainFrm {
/** TiedZoom Button */
- KAction *TiedZoomAction;
+ KAction *_tiedZoomAction;
KAction *_reloadAction;
More information about the Kst
mailing list