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

Mike Fenton mike at staikos.net
Tue Sep 25 18:56:42 CEST 2007


SVN commit 716937 by fenton:

Updated buttons for the datamanger with the text left aligned.


 A             databutton.cpp   [License: GPL (v2+)]
 A             databutton.h   [License: GPL (v2+)]
 A             databuttonaction.cpp   [License: GPL (v2+)]
 A             databuttonaction.h   [License: GPL (v2+)]
 M  +12 -9     datamanager.cpp  
 M  +4 -0      libkstapp.pro  


--- branches/work/kst/portto4/kst/src/libkstapp/datamanager.cpp #716936:716937
@@ -10,6 +10,8 @@
  ***************************************************************************/
 
 #include "datamanager.h"
+#include "databuttonaction.h"
+#include "databutton.h"
 
 #include "vectordialog.h"
 
@@ -51,42 +53,43 @@
 
 //FIXME "Scalar"
 
-  QAction *action = _primitives->addAction(tr("Vector"));
+  QAction *action = new DataButtonAction(tr("Vector"));
+  _primitives->addAction(action);
   connect(action, SIGNAL(triggered()), this, SLOT(showVectorDialog()));
   QWidget *widget = _primitives->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _primitives->addAction(tr("Matrix"));
+  action = _primitives->addWidget(new DataButton(tr("Matrix")));
   widget = _primitives->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
 //FIXME "String"
 
-  action = _dataObjects->addAction(tr("Curve"));
+  action = _dataObjects->addWidget(new DataButton(tr("Curve")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("Equation"));
+  action = _dataObjects->addWidget(new DataButton(tr("Equation")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("Histogram"));
+  action = _dataObjects->addWidget(new DataButton(tr("Histogram")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("Power Spectrum"));
+  action = _dataObjects->addWidget(new DataButton(tr("Power Spectrum")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("Event Monitor"));
+  action = _dataObjects->addWidget(new DataButton(tr("Event Monitor")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("Image"));
+  action = _dataObjects->addWidget(new DataButton(tr("Image")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 
-  action = _dataObjects->addAction(tr("CSD"));
+  action = _dataObjects->addWidget(new DataButton(tr("CSD")));
   widget = _dataObjects->widgetForAction(action);
   widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
 }
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #716936:716937
@@ -27,6 +27,8 @@
     builtingraphics.cpp \
     datadialog.cpp \
     datamanager.cpp \
+    databutton.cpp \
+    databuttonaction.cpp \
     debugdialog.cpp \
     debugnotifier.cpp \
     dialog.cpp \
@@ -75,6 +77,8 @@
     axis.h \
     boxitem.h \
     builtingraphics.h \
+    databutton.h \
+    databuttonaction.h \
     datadialog.h \
     datamanager.h \
     dataref.h \


More information about the Kst mailing list