[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Sun Apr 17 20:34:46 CEST 2005
CVS commit by staikos:
add a "connect" button to the vector dialog to avoid the KIO storm too. Can't
wait longer for feedback if we want a beta
M +17 -1 kstvectordialog_i.cpp 1.72
M +2 -0 kstvectordialog_i.h 1.26
M +11 -0 vectordialog.ui 1.41
--- kdeextragear-2/kst/kst/kstvectordialog_i.cpp #1.71:1.72
@@ -58,4 +58,5 @@ KstVectorDialogI::KstVectorDialogI(QWidg
bool modal, WFlags fl)
: KstVectorDialog(parent, name, modal, fl) {
+ _inTest = false;
FileName->completionObject()->setDir(QDir::currentDirPath());
Init();
@@ -67,4 +68,5 @@ KstVectorDialogI::KstVectorDialogI(QWidg
connect(_readFromSource, SIGNAL(clicked()), this, SLOT(enableSource()));
connect(_generateX, SIGNAL(clicked()), this, SLOT(enableGenerate()));
+ connect(_connect, SIGNAL(clicked()), this, SLOT(testURL()));
_configure->setEnabled(false);
_fieldCompletion = Field->completionObject();
@@ -89,4 +91,11 @@ KstVectorPtr KstVectorDialogI::_getPtr(c
+void KstVectorDialogI::testURL() {
+ _inTest = true;
+ updateCompletion();
+ _inTest = false;
+}
+
+
void KstVectorDialogI::enableSource() {
_rvectorGroup->setEnabled(true);
@@ -124,4 +133,5 @@ void KstVectorDialogI::updateCompletion(
ds->readUnlock();
Field->setEnabled(true);
+ _connect->hide();
} else {
QString type;
@@ -135,7 +145,12 @@ void KstVectorDialogI::updateCompletion(
}
- if (url.isValid()) {
+ if (!_inTest && !url.isLocalFile() && url.protocol() != "file" && !url.protocol().isEmpty()) {
+ _connect->show();
+ } else if (url.isValid()) {
kdDebug() << "URL: " << u << endl;
list = KstDataSource::fieldListForSource(u, QString::null, &type, &complete);
+ if (!_inTest || (_inTest && !list.isEmpty())) {
+ _connect->hide();
+ }
}
Field->setEditable(!complete);
--- kdeextragear-2/kst/kst/kstvectordialog_i.h #1.25:1.26
@@ -52,4 +52,5 @@ class KstVectorDialogI : public KstVecto
void enableGenerate();
void markSourceAndSave();
+ void testURL();
private:
@@ -61,4 +62,5 @@ class KstVectorDialogI : public KstVecto
KstVectorPtr DP;
bool _newDialog;
+ bool _inTest;
/***********************************/
--- kdeextragear-2/kst/kst/vectordialog.ui #1.40:1.41
@@ -188,4 +188,15 @@
<widget class="QPushButton">
<property name="name">
+ <cstring>_connect</cstring>
+ </property>
+ <property name="hidden">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Conn&ect</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
<cstring>_configure</cstring>
</property>
More information about the Kst
mailing list