Skip to content

Commit

Permalink
Reduce margins on delete field dialog, save geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 25, 2014
1 parent bd6df5a commit 79a57a2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 17 deletions.
11 changes: 11 additions & 0 deletions src/app/qgsdelattrdialog.cpp
Expand Up @@ -19,6 +19,8 @@
#include "qgsfield.h"
#include "qgsvectorlayer.h"

#include <QSettings>

QgsDelAttrDialog::QgsDelAttrDialog( const QgsVectorLayer* vl ): QDialog()
{
setupUi( this );
Expand All @@ -32,6 +34,15 @@ QgsDelAttrDialog::QgsDelAttrDialog( const QgsVectorLayer* vl ): QDialog()
item->setData( Qt::UserRole, idx );
}
}

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

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

QList<int> QgsDelAttrDialog::selectedAttributes()
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdelattrdialog.h
Expand Up @@ -29,6 +29,7 @@ class APP_EXPORT QgsDelAttrDialog: public QDialog, private Ui::QgsDelAttrDialogB
Q_OBJECT
public:
QgsDelAttrDialog( const QgsVectorLayer* vl );
~QgsDelAttrDialog();
/**Returns the selected attribute indices*/
QList<int> selectedAttributes();
};
Expand Down
50 changes: 33 additions & 17 deletions src/ui/qgsdelattrdialogbase.ui
@@ -1,35 +1,51 @@
<ui version="4.0" >
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsDelAttrDialogBase</class>
<widget class="QDialog" name="QgsDelAttrDialogBase" >
<property name="geometry" >
<widget class="QDialog" name="QgsDelAttrDialogBase">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>238</height>
</rect>
</property>
<property name="windowTitle" >
<property name="windowTitle">
<string>Delete Attributes</string>
</property>
<layout class="QGridLayout" >
<item row="0" column="0" >
<widget class="QListWidget" name="listBox2" >
<property name="selectionMode" >
<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>3</number>
</property>
<item row="0" column="0">
<widget class="QListWidget" name="listBox2">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::MultiSelection</enum>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QDialogButtonBox" name="buttonBox" >
<property name="standardButtons" >
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
<item row="1" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections>
<connection>
Expand All @@ -38,11 +54,11 @@
<receiver>QgsDelAttrDialogBase</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>314</x>
<y>209</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>356</x>
<y>188</y>
</hint>
Expand All @@ -54,11 +70,11 @@
<receiver>QgsDelAttrDialogBase</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel" >
<hint type="sourcelabel">
<x>234</x>
<y>210</y>
</hint>
<hint type="destinationlabel" >
<hint type="destinationlabel">
<x>197</x>
<y>189</y>
</hint>
Expand Down

0 comments on commit 79a57a2

Please sign in to comment.