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

Mike Fenton mike at staikos.net
Fri Oct 19 19:36:40 CEST 2007


SVN commit 727082 by fenton:

Initial stub checkin of CSDDialog. 
Creation of ColorPalette Widget for use in CSDDialog.
Creation of Palette class for ColorPalette.


 A             libkstapp/csddialog.cpp   [License: GPL (v2+)]
 A             libkstapp/csddialog.h   [License: GPL (v2+)]
 A             libkstapp/csdtab.ui  
 M  +3 -3      libkstapp/datamanager.cpp  
 M  +3 -1      libkstapp/dialoglaunchergui.cpp  
 M  +3 -0      libkstapp/libkstapp.pro  
 M  +2 -0      libkstmath/libkstmath.pro  
 A             libkstmath/palette.cpp   [License: GPL (v2+)]
 A             libkstmath/palette.h   [License: GPL (v2+)]
 A             widgets/colorpalette.cpp   [License: GPL (v2+)]
 A             widgets/colorpalette.h   [License: GPL (v2+)]
 A             widgets/colorpalette.ui  
 M  +1 -0      widgets/widgets.cpp  
 M  +15 -0     widgets/widgets.h  
 M  +4 -1      widgets/widgets.pro  


--- branches/work/kst/portto4/kst/src/libkstapp/datamanager.cpp #727081:727082
@@ -95,9 +95,9 @@
 //   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showImageDialog()));
 //   _dataObjects->addAction(action);
 // 
-//   action = new DataButtonAction(tr("CSD"));
-//   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showCSDDialog()));
-//   _dataObjects->addAction(action);
+   action = new DataButtonAction(tr("Spectrogram"));
+   connect(action, SIGNAL(triggered()), DialogLauncher::self(), SLOT(showCSDDialog()));
+   _dataObjects->addAction(action);
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/dialoglaunchergui.cpp #727081:727082
@@ -19,6 +19,7 @@
 #include "scalardialog.h"
 #include "matrixdialog.h"
 #include "powerspectrumdialog.h"
+#include "csddialog.h"
 
 namespace Kst {
 
@@ -82,7 +83,8 @@
 
 
 void DialogLauncherGui::showCSDDialog(ObjectPtr objectPtr) {
-  Q_UNUSED(objectPtr);
+  CSDDialog dialog(objectPtr, kstApp->mainWindow());
+  dialog.exec();
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #727081:727082
@@ -27,6 +27,7 @@
     boxitem.cpp \
     builtingraphics.cpp \
     cartesianrenderitem.cpp \
+    csddialog.cpp \
     curvedialog.cpp \
     databutton.cpp \
     databuttonaction.cpp \
@@ -94,6 +95,7 @@
     boxitem.h \
     builtingraphics.h \
     cartesianrenderitem.h \
+    csddialog.h \
     curvedialog.h \
     databutton.h \
     databuttonaction.h \
@@ -157,6 +159,7 @@
 
 FORMS += \
     aboutdialog.ui \
+    csdtab.ui \
     curvetab.ui \
     datamanager.ui \
     debugdialog.ui \
--- branches/work/kst/portto4/kst/src/libkstmath/libkstmath.pro #727081:727082
@@ -47,6 +47,7 @@
     dialoglauncher.cpp \
     eparse-eh.cpp \
     eparse.c \
+    palette.cpp \
     psdcalculator.cpp \
     escan.c \
     objectfactory.cpp \
@@ -76,6 +77,7 @@
     linestyle.h \
     objectdefaults.h \
     painter.h \
+    palette.h \
     plotdefines.h \
     psd.h \
     settings.h \
--- branches/work/kst/portto4/kst/src/widgets/widgets.cpp #727081:727082
@@ -27,6 +27,7 @@
   _plugins.append(new CurvePlacementPlugin(this));
   _plugins.append(new CurveAppearancePlugin(this));
   _plugins.append(new FFTOptionsPlugin(this));
+  _plugins.append(new ColorPalettePlugin(this));
 }
 
 
--- branches/work/kst/portto4/kst/src/widgets/widgets.h #727081:727082
@@ -29,6 +29,7 @@
 #include "curveappearance.h"
 #include "curveplacement.h"
 #include "fftoptions.h"
+#include "colorpalette.h"
 
 namespace Kst {
 
@@ -222,6 +223,20 @@
     }
 };
 
+
+class ColorPalettePlugin : public WidgetPlugin {
+  Q_OBJECT
+  Q_INTERFACES(QDesignerCustomWidgetInterface)
+  public:
+    ColorPalettePlugin(QObject *parent = 0) : WidgetPlugin(parent) {}
+    QString name() const {
+      return QLatin1String("ColorPalette");
+    } //do not translate
+    QWidget *createWidget(QWidget *parent) {
+      return new ColorPalette(parent);
+    }
+};
+
 }
 
 #endif
--- branches/work/kst/portto4/kst/src/widgets/widgets.pro #727081:727082
@@ -24,6 +24,7 @@
 
 SOURCES += \
     colorbutton.cpp \
+    colorpalette.cpp \
     combobox.cpp \
     curveappearance.cpp \
     curveplacement.cpp \
@@ -39,6 +40,7 @@
 
 HEADERS += \
     colorbutton.h \
+    colorpalette.h \
     combobox.h \
     curveappearance.h \
     curveplacement.h \
@@ -53,9 +55,10 @@
     widgets.h
 
 FORMS += \
-    datarange.ui \
+    colorpalette.ui \
     curveappearance.ui \
     curveplacement.ui \
+    datarange.ui \
     fftoptions.ui \
     matrixselector.ui \
     scalarselector.ui \


More information about the Kst mailing list