[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Sun Sep 28 00:41:27 CEST 2003
CVS commit by staikos:
Most of the implementation require for this feature. Requires more design in
order to complete.
CCMAIL: 64894 at bugs.kde.org
M +8 -0 kst.cpp 1.53
M +7 -1 kst.h 1.20
M +10 -0 kstview.cpp 1.49
M +4 -0 kstview.h 1.22
--- kdeextragear-2/kst/kst/kst.cpp #1.52:1.53
@@ -390,4 +390,8 @@ void KstApp::initActions() {
actionCollection(), "pluginmanager_action");
+ DataMode = new KToggleAction(i18n("DataMode"), 0, 0,
+ this, SLOT(toggleDataMode()),
+ actionCollection(), "datamode_action");
+
createGUI();
}
@@ -703,4 +707,8 @@ void KstApp::slotUpdateFrameMsg(int fram
void KstApp::slotUpdateDataMsg(const QString &msg) {
statusBar()->changeItem(msg, KST_STATUSBAR_DATA);
+}
+
+void KstApp::toggleDataMode() {
+ view->setDataMode(DataMode->isChecked());
}
--- kdeextragear-2/kst/kst/kst.h #1.19:1.20
@@ -151,4 +151,7 @@ private slots:
void updateActions();
+ // for the kaction
+ void toggleDataMode();
+
public slots:
void slotConfigureKeys();
@@ -324,4 +327,7 @@ private:
/* Vector Save Action */
KAction *_vectorSaveAction;
+
+ /* Data mode */
+ KToggleAction *DataMode;
/** Change File Action: brings up the change file dialog box */
--- kdeextragear-2/kst/kst/kstview.cpp #1.48:1.49
@@ -56,4 +56,5 @@ KstView::KstView(KstApp *parent, const c
first_time = true;
_minMove = 3;
+ _dataMode = false;
ZoomCurrentPlot = false;
@@ -364,4 +365,8 @@ void KstView::update() {
needrecreate = true;
paintEvent(NULL);
+ updateMouse();
+}
+
+void KstView::updateMouse() {
int plot = MouseInfo->getPlotNum();
KstPlot* pPlot;
@@ -1341,4 +1346,9 @@ void KstView::cleanupLayout() {
KST::plotList.arrangePlots(KST::plotList.getPlotCols());
update();
+}
+
+void KstView::setDataMode(bool on) {
+ _dataMode = on;
+ updateMouse();
}
--- kdeextragear-2/kst/kst/kstview.h #1.21:1.22
@@ -82,4 +82,5 @@ public slots:
void zoomPlotSlot();
+ void setDataMode(bool on);
void forceUpdate();
@@ -118,4 +119,6 @@ private:
int ZoomPlotNum;
+ bool _dataMode;
+
/** the smallest move to consider as a box */
int _minMove;
@@ -137,4 +140,5 @@ private slots:
void dynamicMenuEdit(int);
void deleteCurrentPlot();
+ void updateMouse();
signals:
More information about the Kst
mailing list