Skip to content
Permalink
Browse files
Reduce margins on delete field dialog, save geometry
  • Loading branch information
NathanW2 committed May 25, 2014
1 parent bd6df5a commit 79a57a2cf15b0a874e76a9e92469e5559c917c3b
Showing with 45 additions and 17 deletions.
  1. +11 −0 src/app/qgsdelattrdialog.cpp
  2. +1 −0 src/app/qgsdelattrdialog.h
  3. +33 −17 src/ui/qgsdelattrdialogbase.ui
@@ -19,6 +19,8 @@
#include "qgsfield.h"
#include "qgsvectorlayer.h"

#include <QSettings>

QgsDelAttrDialog::QgsDelAttrDialog( const QgsVectorLayer* vl ): QDialog()
{
setupUi( this );
@@ -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()
@@ -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();
};
@@ -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>
@@ -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>
@@ -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>

0 comments on commit 79a57a2

Please sign in to comment.