Skip to content

Commit

Permalink
Missing qgssavestyletodbdialog ui files
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio Loi committed Apr 13, 2013
1 parent e21ace6 commit 4826e28
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/app/qgssavestyletodbdialog.cpp
@@ -0,0 +1,33 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgssavestyletodbdialog.h"

QgsSaveStyleToDbDialog::QgsSaveStyleToDbDialog( QWidget *parent ) :
QDialog( parent )
{
setupUi( this );
setWindowTitle( "Save style in Postgres" );
mDescriptionEdit->setTabChangesFocus( true );
setTabOrder( mNameEdit, mDescriptionEdit );
setTabOrder( mDescriptionEdit, mUseAsDefault );
setTabOrder( mUseAsDefault, buttonBox );
}
QString QgsSaveStyleToDbDialog::getName()
{
return mNameEdit->text();
}
QString QgsSaveStyleToDbDialog::getDescription()
{
return mDescriptionEdit->toPlainText();
}
bool QgsSaveStyleToDbDialog::isDefault()
{
return mUseAsDefault->isChecked();
}
30 changes: 30 additions & 0 deletions src/app/qgssavestyletodbdialog.h
@@ -0,0 +1,30 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#ifndef QGSADDATTRDIALOG_H
#define QGSADDATTRDIALOG_H

#include "ui_qgssavetodbdialog.h"
#include "qgisgui.h"
#include "qgsfield.h"

class QgsSaveStyleToDbDialog : public QDialog, private Ui::QgsSaveToDBDialog
{
Q_OBJECT
public:
explicit QgsSaveStyleToDbDialog(QWidget *parent = 0);

signals:
public slots:
QString getName();
QString getDescription();
bool isDefault();
};

#endif // QGSSAVESTYLETODBDIALOG_H
102 changes: 102 additions & 0 deletions src/ui/qgssavetodbdialog.ui
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QgsSaveToDBDialog</class>
<widget class="QDialog" name="QgsSaveToDBDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>355</width>
<height>235</height>
</rect>
</property>
<property name="windowTitle">
<string>Add column</string>
</property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="QPlainTextEdit" name="mDescriptionEdit"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="descriptionLabel">
<property name="text">
<string>Description</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Style Name</string>
</property>
<property name="buddy">
<cstring>mNameEdit</cstring>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="mUseAsDefault">
<property name="text">
<string>Use as default style for this layer</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="mNameEdit"/>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>mNameEdit</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>QgsSaveToDBDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>254</x>
<y>206</y>
</hint>
<hint type="destinationlabel">
<x>263</x>
<y>68</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>QgsSaveToDBDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>254</x>
<y>206</y>
</hint>
<hint type="destinationlabel">
<x>6</x>
<y>77</y>
</hint>
</hints>
</connection>
</connections>
</ui>

0 comments on commit 4826e28

Please sign in to comment.