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

Adam Treat treat at kde.org
Mon Sep 24 18:05:10 CEST 2007


SVN commit 716379 by treat:

* Make vector dialog look better and use the new
Kst::Dialog class.
* Don't set margin in new FileRequester.


 M  +23 -2     libkstapp/vectordialog.cpp  
 M  +13 -2     libkstapp/vectordialog.h  
 M  +0 -18     libkstapp/vectordialog.ui  
 M  +1 -0      widgets/filerequester.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.cpp #716378:716379
@@ -11,13 +11,34 @@
 
 #include "vectordialog.h"
 
+#include "dialogpage.h"
+
 namespace Kst {
 
+VectorTab::VectorTab(QWidget *parent)
+  : DialogTab(parent) {
+
+  setupUi(this);
+  setTabTitle(tr("Vector"));
+}
+
+
+VectorTab::~VectorTab() {
+}
+
+
 VectorDialog::VectorDialog(QWidget *parent)
-  : QDialog(parent) {
+  : Dialog(parent) {
 
-  setupUi(this);
   setWindowTitle(tr("New Vector"));
+
+  _vectorTab = new VectorTab(this);
+//  connect(_vectorTab, SIGNAL(apply()), this, SLOT(vectorChanged()));
+
+  DialogPage *page = new DialogPage(this);
+  page->setPageTitle(tr("Vector"));
+  page->addDialogTab(_vectorTab);
+  addDialogPage(page);
 }
 
 
--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.h #716378:716379
@@ -12,7 +12,8 @@
 #ifndef VECTORDIALOG_H
 #define VECTORDIALOG_H
 
-#include <QDialog>
+#include "dialog.h"
+#include "dialogtab.h"
 
 #include "ui_vectordialog.h"
 
@@ -20,11 +21,21 @@
 
 namespace Kst {
 
-class KST_EXPORT VectorDialog : public QDialog, Ui::VectorDialog {
+class KST_EXPORT VectorTab : public DialogTab, Ui::VectorDialog {
   Q_OBJECT
   public:
+    VectorTab(QWidget *parent = 0);
+    virtual ~VectorTab();
+};
+
+class KST_EXPORT VectorDialog : public Dialog {
+  Q_OBJECT
+  public:
     VectorDialog(QWidget *parent = 0);
     virtual ~VectorDialog();
+
+  private:
+    VectorTab *_vectorTab;
 };
 
 }
--- branches/work/kst/portto4/kst/src/libkstapp/vectordialog.ui #716378:716379
@@ -10,24 +10,6 @@
    </rect>
   </property>
   <layout class="QGridLayout" >
-   <property name="leftMargin" >
-    <number>0</number>
-   </property>
-   <property name="topMargin" >
-    <number>0</number>
-   </property>
-   <property name="rightMargin" >
-    <number>0</number>
-   </property>
-   <property name="bottomMargin" >
-    <number>0</number>
-   </property>
-   <property name="horizontalSpacing" >
-    <number>0</number>
-   </property>
-   <property name="verticalSpacing" >
-    <number>0</number>
-   </property>
    <item row="0" column="0" >
     <widget class="QGroupBox" name="sourceGroup" >
      <property name="title" >
--- branches/work/kst/portto4/kst/src/widgets/filerequester.cpp #716378:716379
@@ -25,6 +25,7 @@
   _fileButton = new QToolButton(this);
 
   QHBoxLayout * layout = new QHBoxLayout(this);
+  layout->setMargin(0);
   layout->addWidget(_fileEdit);
   layout->addWidget(_fileButton);
   setLayout(layout);


More information about the Kst mailing list