mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #1022 from 3nids/dxfunselectall
[DXF] add (un)select all buttons
This commit is contained in:
commit
c21c90a076
@ -11,6 +11,8 @@ QgsDxfExportDialog::QgsDxfExportDialog( const QList<QgsMapLayer*>& layerKeys, QW
|
||||
setupUi( this );
|
||||
connect( mFileLineEdit, SIGNAL( textChanged( const QString& ) ), this, SLOT( setOkEnabled() ) );
|
||||
connect( this, SIGNAL( accepted() ), this, SLOT( saveSettings() ) );
|
||||
connect( mSelectAllButton, SIGNAL( clicked() ), this, SLOT( selectAll() ) );
|
||||
connect( mUnSelectAllButton, SIGNAL( clicked() ), this, SLOT( unSelectAll() ) );
|
||||
|
||||
QList<QgsMapLayer*>::const_iterator layerIt = layerKeys.constBegin();
|
||||
for ( ; layerIt != layerKeys.constEnd(); ++layerIt )
|
||||
@ -43,6 +45,18 @@ QgsDxfExportDialog::~QgsDxfExportDialog()
|
||||
|
||||
}
|
||||
|
||||
void QgsDxfExportDialog::selectAll()
|
||||
{
|
||||
for ( int r = 0; r < mLayersListWidget->count(); r++ )
|
||||
mLayersListWidget->item( r )->setCheckState( Qt::Checked );
|
||||
}
|
||||
|
||||
void QgsDxfExportDialog::unSelectAll()
|
||||
{
|
||||
for ( int r = 0; r < mLayersListWidget->count(); r++ )
|
||||
mLayersListWidget->item( r )->setCheckState( Qt::Unchecked );
|
||||
}
|
||||
|
||||
QList<QString> QgsDxfExportDialog::layers() const
|
||||
{
|
||||
QList<QString> layerKeyList;
|
||||
|
@ -16,6 +16,11 @@ class QgsDxfExportDialog: public QDialog, private Ui::QgsDxfExportDialogBase
|
||||
QgsDxfExport::SymbologyExport symbologyMode() const;
|
||||
QString saveFile() const;
|
||||
|
||||
public slots:
|
||||
/** change the selection of layers in the list */
|
||||
void selectAll();
|
||||
void unSelectAll();
|
||||
|
||||
private slots:
|
||||
void on_mFileSelectionButton_clicked();
|
||||
void setOkEnabled();
|
||||
|
@ -14,7 +14,17 @@
|
||||
<string>DXF export</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<item row="4" column="1">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mFileLineEdit"/>
|
||||
@ -74,15 +84,36 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="mSelectAllButton">
|
||||
<property name="text">
|
||||
<string>Select all</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="mUnSelectAllButton">
|
||||
<property name="text">
|
||||
<string>Unselet all</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@ -95,8 +126,8 @@
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
<x>263</x>
|
||||
<y>282</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
|
Loading…
x
Reference in New Issue
Block a user