[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu Jun 24 23:49:27 CEST 2004
CVS commit by arwalker:
Revert back to the non-embedded file dialog.
M +1 -1 datawizard.ui 1.43
M +20 -8 datawizard.ui.h 1.48
--- kdeextragear-2/kst/kst/datawizard.ui #1.42:1.43
@@ -1049,4 +1049,5 @@
<slot access="private">init()</slot>
<slot access="private">xChanged( const QString & txt )</slot>
+ <slot access="private">sourceChangedBase( const QString & txt )</slot>
<slot access="private">sourceChanged( const QString & txt )</slot>
<slot access="private">fieldListChanged()</slot>
@@ -1066,5 +1067,4 @@
<slot access="private">_disableWindowEntries()</slot>
<slot access="private">_enableWindowEntries()</slot>
- <slot access="private">sourceChangedBase(const QString & txt)</slot>
</slots>
<functions>
--- kdeextragear-2/kst/kst/datawizard.ui.h #1.47:1.48
@@ -13,4 +13,5 @@
#include <qobjectlist.h>
#include <qmessagebox.h>
+#include <qsizepolicy.h>
#include <kpushbutton.h>
@@ -30,6 +31,4 @@ void DataWizard::init() {
default_source = KST::vectorDefaults.dataSource();
-#define FILE_INPUT_EMBEDDED 1
-
#ifdef FILE_INPUT_EMBEDDED
KstFileDialog* fd;
@@ -72,10 +71,15 @@ void DataWizard::init() {
QSpacerItem* spacerLo;
QSpacerItem* spacerHi;
+ QSpacerItem* spacerLeft;
+ QSpacerItem* spacerRight;
+ QBoxLayout* pHLayout;
fd = new KURLRequester();
fd->reparent(page(0), point);
- spacerLo = new QSpacerItem(10, 50);
- spacerHi = new QSpacerItem(10, 50);
+ spacerLo = new QSpacerItem(10, 50, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ spacerHi = new QSpacerItem(10, 50, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ spacerLeft = new QSpacerItem(50, 50, QSizePolicy::Minimum, QSizePolicy::Minimum);
+ spacerRight = new QSpacerItem(50, 50, QSizePolicy::Minimum, QSizePolicy::Minimum);
pLayout = page(0)->layout();
@@ -83,11 +87,17 @@ void DataWizard::init() {
pBoxLayout = dynamic_cast<QBoxLayout*>(pLayout);
if (pBoxLayout) {
+ pHLayout = new QBoxLayout(pLayout, QBoxLayout::LeftToRight);
+ if (pHLayout) {
+ pHLayout->addItem(spacerLeft);
+ pHLayout->addWidget(fd);
+ pHLayout->addItem(spacerRight);
+
pBoxLayout->addItem(spacerLo);
- pBoxLayout->addWidget(fd);
+ pBoxLayout->addItem(pHLayout);
pBoxLayout->addItem(spacerHi);
}
}
+ }
- fd->setPreviewWidget((KPreviewWidgetBase*)NULL);
fd->setMode(KFile::File | KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly);
fd->setURL(default_source);
@@ -167,4 +177,6 @@ void DataWizard::xChanged( const QString
void DataWizard::sourceChangedBase( const QString &txt ) {
+ Q_UNUSED(txt)
+
KFileDialog *fileDialog = (KFileDialog*)child( "file dialog", "KFileDialog", TRUE );
QString file;
More information about the Kst
mailing list