[Kst] branches/work/kst/portto4/kst/src/libkstapp

Mike Fenton mike at staikos.net
Thu Oct 25 16:47:49 CEST 2007


SVN commit 729296 by fenton:

Initial Stub version of ChooseColorDialog.


 A             choosecolordialog.cpp   [License: GPL (v2+)]
 A             choosecolordialog.h   [License: GPL (v2+)]
 A             choosecolordialog.ui  
 M  +3 -0      libkstapp.pro  
 M  +13 -0     mainwindow.cpp  
 M  +2 -0      mainwindow.h  


--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #729295:729296
@@ -28,6 +28,7 @@
     boxitem.cpp \
     builtingraphics.cpp \
     cartesianrenderitem.cpp \
+    choosecolordialog.cpp \
     csddialog.cpp \
     curvedialog.cpp \
     databutton.cpp \
@@ -106,6 +107,7 @@
     boxitem.h \
     builtingraphics.h \
     cartesianrenderitem.h \
+    choosecolordialog.h \
     csddialog.h \
     curvedialog.h \
     databutton.h \
@@ -180,6 +182,7 @@
 FORMS += \
     aboutdialog.ui \
     basicplugintab.ui \
+    choosecolordialog.ui \
     csdtab.ui \
     curvetab.ui \
     datamanager.ui \
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.cpp #729295:729296
@@ -36,6 +36,7 @@
 
 #include "applicationsettingsdialog.h"
 #include "differentiatecurvesdialog.h"
+#include "choosecolordialog.h"
 
 #include <QtGui>
 
@@ -537,6 +538,10 @@
   _differentiateCurvesDialogAct = new QAction(tr("&Differentiate Curves"), this);
   _differentiateCurvesDialogAct->setStatusTip(tr("Show Kst's Differentiate Curves Dialog"));
   connect(_differentiateCurvesDialogAct, SIGNAL(triggered()), this, SLOT(showDifferentiateCurvesDialog()));
+
+  _chooseColorDialogAct = new QAction(tr("Assign &Curve Color per File"), this);
+  _chooseColorDialogAct->setStatusTip(tr("Show Kst's Choose Color Dialog"));
+  connect(_chooseColorDialogAct, SIGNAL(triggered()), this, SLOT(showChooseColorDialog()));
 }
 
 
@@ -584,6 +589,7 @@
   _layoutMenu->addAction(_createSvgAct);
 
   _toolsMenu = menuBar()->addMenu(tr("&Tools"));
+  _toolsMenu->addAction(_chooseColorDialogAct);
   _toolsMenu->addAction(_differentiateCurvesDialogAct);
 
   _settingsMenu = menuBar()->addMenu(tr("&Settings"));
@@ -725,6 +731,13 @@
 }
 
 
+void MainWindow::showChooseColorDialog() {
+  ChooseColorDialog chooseColorDialog(this);
+  chooseColorDialog.exec();
+}
+
+
+
 void MainWindow::readSettings() {
   QSettings settings;
   QPoint pos = settings.value("pos", QPoint(20, 20)).toPoint();
--- branches/work/kst/portto4/kst/src/libkstapp/mainwindow.h #729295:729296
@@ -55,6 +55,7 @@
     void showViewManager();
     void showSettingsDialog();
     void showDifferentiateCurvesDialog();
+    void showChooseColorDialog();
 
     void save();
     void saveAs();
@@ -163,6 +164,7 @@
     QAction *_settingsDialogAct;
 
     QAction *_differentiateCurvesDialogAct;
+    QAction *_chooseColorDialogAct;
 };
 
 }


More information about the Kst mailing list