[Kst] branches/work/kst/kst1kde4/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Wed Apr 28 23:22:28 CEST 2010
SVN commit 1120324 by arwalker:
continue kst1kde4
M +2 -0 kst.cpp
M +49 -51 kstdatadialog.cpp
M +4 -2 kstdatadialog.h
M +4 -0 kstdatadialog.ui
M +2 -3 kstvectordialog.cpp
M +5 -5 vectordialogwidget.ui
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kst.cpp #1120323:1120324
@@ -475,7 +475,9 @@
/* xxx
connect(_actionManagerData, SIGNAL(triggered()), _dataManager, SLOT(show_I()));
connect(_actionManagerView, SIGNAL(triggered()), _viewManager, SLOT(show_I()));
+*/
connect(_actionNewVector, SIGNAL(triggered()), KstVectorDialog::globalInstance(), SLOT(show()));
+/* xxx
connect(_actionNewCurve, SIGNAL(triggered()), KstCurveDialog::globalInstance(), SLOT(show()));
connect(_actionNewEquation, SIGNAL(triggered()), KstEqDialog::globalInstance(), SLOT(show()));
connect(_actionNewHistogram, SIGNAL(triggered()), KstHsDialog::globalInstance(), SLOT(show()));
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatadialog.cpp #1120323:1120324
@@ -14,8 +14,7 @@
#include "kstdataobjectcollection.h"
#include "kstdoc.h"
-KstDataDialog::KstDataDialog(QWidget *parent) : QDialog(parent)
-{
+KstDataDialog::KstDataDialog(QWidget *parent) : QDialog(parent) {
setupUi(this);
_dp = 0L;
@@ -30,11 +29,12 @@
_editMultipleWidget->hide();
}
-KstDataDialog::~KstDataDialog()
-{}
-void KstDataDialog::ok()
-{
+KstDataDialog::~KstDataDialog() {
+}
+
+
+void KstDataDialog::ok() {
_ok->setEnabled(false);
_apply->setEnabled(false);
_cancel->setEnabled(false);
@@ -57,8 +57,8 @@
}
}
-void KstDataDialog::apply()
-{
+
+void KstDataDialog::apply() {
if (!_newDialog && !_dp) {
if (editObject()) {
_apply->setEnabled(false);
@@ -66,36 +66,36 @@
}
}
-void KstDataDialog::close()
-{
+
+void KstDataDialog::close() {
_dp = 0L;
QDialog::close();
}
-void KstDataDialog::wasModifiedApply()
-{
+
+void KstDataDialog::wasModifiedApply() {
if (!_newDialog && _dp) {
_apply->setEnabled(true);
}
}
-void KstDataDialog::reject()
-{
+
+void KstDataDialog::reject() {
_dp = 0L;
QDialog::reject();
}
-void KstDataDialog::update()
-{
+
+void KstDataDialog::update() {
}
-void KstDataDialog::show()
-{
+
+void KstDataDialog::show() {
showNew(QString::null);
}
-void KstDataDialog::showNew(const QString& field)
-{
+
+void KstDataDialog::showNew(const QString& field) {
Q_UNUSED(field) //used by plugin dialogs which inherit this class
_newDialog = true;
@@ -118,8 +118,8 @@
_cancel->setEnabled(true);
}
-void KstDataDialog::showEdit(const QString& field)
-{
+
+void KstDataDialog::showEdit(const QString& field) {
_newDialog = false;
_dp = findObject(field);
@@ -128,7 +128,7 @@
} else {
if (_multiple) {
_editMultiple->show();
- _editMultiple->setText(i18n("Edit Multiple >>"));
+ _editMultiple->setText(QObject::tr("Edit Multiple >>"));
_editMultipleWidget->hide();
_editMultipleMode = false;
}
@@ -148,26 +148,26 @@
}
}
-QString KstDataDialog::editTitle()
-{
+
+QString KstDataDialog::editTitle() {
return QString::null;
}
-QString KstDataDialog::newTitle()
-{
+
+QString KstDataDialog::newTitle() {
return QString::null;
}
-void KstDataDialog::fillFieldsForEdit()
-{
+
+void KstDataDialog::fillFieldsForEdit() {
}
-void KstDataDialog::fillFieldsForNew()
-{
+
+void KstDataDialog::fillFieldsForNew() {
}
-KstObjectPtr KstDataDialog::findObject( const QString & name )
-{
+
+KstObjectPtr KstDataDialog::findObject( const QString & name ) {
KstObjectPtr obj;
KST::dataObjectList.lock().readLock();
@@ -177,32 +177,32 @@
return obj;
}
-bool KstDataDialog::newObject()
-{
+
+bool KstDataDialog::newObject() {
return false;
}
-bool KstDataDialog::editObject()
-{
+
+bool KstDataDialog::editObject() {
return false;
}
-void KstDataDialog::populateEditMultiple()
-{
+
+void KstDataDialog::populateEditMultiple() {
}
-bool KstDataDialog::multiple()
-{
+
+bool KstDataDialog::multiple() {
return _multiple;
}
-void KstDataDialog::setMultiple(bool multiple)
-{
+
+void KstDataDialog::setMultiple(bool multiple) {
_multiple = multiple;
}
-void KstDataDialog::toggleEditMultiple()
-{
+
+void KstDataDialog::toggleEditMultiple() {
if (_multiple) {
if (_editMultipleMode) {
cleanup();
@@ -217,7 +217,7 @@
populateEditMultiple();
_editMultipleWidget->show();
- _editMultiple->setText(i18n("Edit Multiple <<"));
+ _editMultiple->setText(QObject::tr("Edit Multiple <<"));
adjustSize();
resize(minimumSizeHint());
setFixedHeight(height());
@@ -225,13 +225,11 @@
}
}
-void KstDataDialog::closeEvent(QCloseEvent *e)
-{
+void KstDataDialog::closeEvent(QCloseEvent *e) {
cleanup();
QWidget::closeEvent(e);
}
-void KstDataDialog::cleanup()
-{
-}
+void KstDataDialog::cleanup() {
+}
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatadialog.h #1120323:1120324
@@ -23,7 +23,6 @@
KstDataDialog(QWidget *parent = 0);
virtual ~KstDataDialog();
- void wasModifiedApply();
void update();
void show();
void showNew(const QString& field);
@@ -42,7 +41,10 @@
void closeEvent(QCloseEvent *e);
void cleanup();
-private Q_SLOTS:
+public slots:
+ void wasModifiedApply();
+
+private slots:
void ok();
void apply();
void close();
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstdatadialog.ui #1120323:1120324
@@ -79,6 +79,10 @@
</item>
</layout>
</item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="_contents">
+ </widget>
+ </item>
<item row="0" column="1" rowspan="2">
<widget class="EditMultipleWidget" name="_editMultipleWidget" native="true">
<property name="sizePolicy">
--- branches/work/kst/kst1kde4/kst/src/libkstapp/kstvectordialog.cpp #1120323:1120324
@@ -16,8 +16,6 @@
* *
***************************************************************************/
-#include <assert.h>
-
#include <QButtonGroup>
#include <QCheckBox>
#include <QFileDialog>
@@ -47,13 +45,14 @@
if (!_inst) {
_inst = new KstVectorDialog(KstApp::inst());
}
+
return _inst;
}
KstVectorDialog::KstVectorDialog(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : KstDataDialog(parent) {
_w = new Ui::VectorDialogWidget();
- _w->setupUi(this);
+ _w->setupUi(_contents);
setMultiple(true);
_inTest = false;
--- branches/work/kst/kst1kde4/kst/src/libkstapp/vectordialogwidget.ui #1120323:1120324
@@ -11,14 +11,14 @@
<height>432</height>
</rect>
</property>
- <layout class="QGridLayout">
+ <layout class="QVBoxLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
- <item row="0" column="0">
+ <item>
<widget class="QGroupBox" name="sourceGroup">
<property name="title">
<string>Source</string>
@@ -69,7 +69,7 @@
</layout>
</widget>
</item>
- <item row="2" column="0">
+ <item>
<widget class="KstDataRange" name="_kstDataRange" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
@@ -79,7 +79,7 @@
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item>
<widget class="QGroupBox" name="_rvectorGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
@@ -185,7 +185,7 @@
</layout>
</widget>
</item>
- <item row="3" column="0">
+ <item>
<widget class="QGroupBox" name="_svectorGroup">
<property name="enabled">
<bool>false</bool>
More information about the Kst
mailing list