7 changes: 7 additions & 0 deletions src/gui/symbology-ng/qgsstylev2managerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <QFileDialog>
#include <QInputDialog>
#include <QMessageBox>
#include <QSettings>
#include <QStandardItemModel>

#include "qgsapplication.h"
Expand All @@ -29,6 +30,9 @@ QgsStyleV2ManagerDialog::QgsStyleV2ManagerDialog( QgsStyleV2* style, QWidget* pa

setupUi( this );

QSettings settings;
restoreGeometry( settings.value( "/Windows/StyleV2Manager/geometry" ).toByteArray() );

#if QT_VERSION >= 0x40500
tabItemType->setDocumentMode( true );
#endif
Expand Down Expand Up @@ -67,6 +71,9 @@ void QgsStyleV2ManagerDialog::onFinished()
{
mStyle->save();
}

QSettings settings;
settings.setValue( "/Windows/StyleV2Manager/geometry", saveGeometry() );
}

void QgsStyleV2ManagerDialog::populateTypes()
Expand Down
10 changes: 10 additions & 0 deletions src/providers/spatialite/qgsspatialitesourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget * parent, Qt::WFla
QDialog( parent, fl )
{
setupUi( this );

QSettings settings;
restoreGeometry( settings.value( "/Windows/SpatiaLiteSourceSelect/geometry" ).toByteArray() );

setWindowTitle( tr( "Add SpatiaLite Table(s)" ) );
connectionsGroupBox->setTitle( tr( "Databases" ) );
btnEdit->hide(); // hide the edit button
Expand Down Expand Up @@ -103,6 +107,12 @@ QgsSpatiaLiteSourceSelect::QgsSpatiaLiteSourceSelect( QWidget * parent, Qt::WFla
cbxAllowGeometrylessTables->setDisabled( true );
}

QgsSpatiaLiteSourceSelect::~QgsSpatiaLiteSourceSelect()
{
QSettings settings;
settings.setValue( "/Windows/SpatiaLiteSourceSelect/geometry", saveGeometry() );
}

// Slot for performing action when the Add button is clicked
void QgsSpatiaLiteSourceSelect::addClicked()
{
Expand Down
2 changes: 1 addition & 1 deletion src/providers/spatialite/qgsspatialitesourceselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class QgsSpatiaLiteSourceSelect: public QDialog, private Ui::QgsDbSourceSelectBa
//! Constructor
QgsSpatiaLiteSourceSelect( QWidget * parent, Qt::WFlags fl = QgisGui::ModalDialogFlags, bool embedded = false );
//! Destructor
~QgsSpatiaLiteSourceSelect() {}
~QgsSpatiaLiteSourceSelect();
//! Populate the connection list combo box
void populateConnectionList();
//! Determines the tables the user selected and closes the dialog
Expand Down
276 changes: 113 additions & 163 deletions src/ui/qgsnewogrconnectionbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>706</width>
<height>541</height>
<width>404</width>
<height>348</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -37,173 +37,123 @@
<property name="title">
<string>Connection Information</string>
</property>
<layout class="QGridLayout">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>5</number>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Type</string>
</property>
<property name="buddy">
<cstring>cmbDatabaseTypes</cstring>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QComboBox" name="cmbDatabaseTypes"/>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
<widget class="QLabel" name="TextLabel1_2">
<property name="text">
<string>Name</string>
</property>
<property name="margin">
<number>0</number>
<property name="buddy">
<cstring>txtName</cstring>
</property>
<item>
<widget class="QCheckBox" name="chkStorePassword">
<property name="text">
<string>Save Password</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnConnect">
<property name="text">
<string>&amp;Test Connect</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
<item row="1" column="1" colspan="2">
<widget class="QLineEdit" name="txtName">
<property name="toolTip">
<string>Name of the new connection</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="TextLabel1">
<property name="text">
<string>Host</string>
</property>
<property name="buddy">
<cstring>txtHost</cstring>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="QLineEdit" name="txtHost"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="TextLabel2">
<property name="text">
<string>Database</string>
</property>
<property name="buddy">
<cstring>txtDatabase</cstring>
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<widget class="QLineEdit" name="txtDatabase"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="TextLabel2_2">
<property name="text">
<string>Port</string>
</property>
<property name="margin">
<number>0</number>
<property name="buddy">
<cstring>txtPort</cstring>
</property>
</widget>
</item>
<item row="4" column="1" colspan="2">
<widget class="QLineEdit" name="txtPort">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="TextLabel3">
<property name="text">
<string>Username</string>
</property>
<property name="buddy">
<cstring>txtUsername</cstring>
</property>
</widget>
</item>
<item row="5" column="1" colspan="2">
<widget class="QLineEdit" name="txtUsername"/>
</item>
<item row="6" column="0">
<widget class="QLabel" name="TextLabel3_2">
<property name="text">
<string>Password</string>
</property>
<property name="buddy">
<cstring>txtPassword</cstring>
</property>
</widget>
</item>
<item row="6" column="1" colspan="2">
<widget class="QLineEdit" name="txtPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="chkStorePassword">
<property name="text">
<string>Save Password</string>
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QPushButton" name="btnConnect">
<property name="text">
<string>&amp;Test Connect</string>
</property>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Type&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="buddy">
<cstring>cmbDatabaseTypes</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel1_2">
<property name="text">
<string>Name</string>
</property>
<property name="buddy">
<cstring>txtName</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel1">
<property name="text">
<string>Host</string>
</property>
<property name="buddy">
<cstring>txtHost</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel2">
<property name="text">
<string>Database</string>
</property>
<property name="buddy">
<cstring>txtDatabase</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel2_2">
<property name="text">
<string>Port</string>
</property>
<property name="buddy">
<cstring>txtPort</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3">
<property name="text">
<string>Username</string>
</property>
<property name="buddy">
<cstring>txtUsername</cstring>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="TextLabel3_2">
<property name="text">
<string>Password</string>
</property>
<property name="buddy">
<cstring>txtPassword</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="cmbDatabaseTypes"/>
</item>
<item>
<widget class="QLineEdit" name="txtName">
<property name="toolTip">
<string>Name of the new connection</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="txtHost"/>
</item>
<item>
<widget class="QLineEdit" name="txtDatabase"/>
</item>
<item>
<widget class="QLineEdit" name="txtPort">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="txtUsername"/>
</item>
<item>
<widget class="QLineEdit" name="txtPassword">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
Expand Down