forked from pencil2d/pencil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting can be edited, and are saved in file.
- Loading branch information
1 parent
569a54e
commit 84b8322
Showing
8 changed files
with
250 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "layerpropertiesdialog.h" | ||
#include "ui_layerpropertiesdialog.h" | ||
|
||
#include <QPushButton> | ||
#include <QMessageBox> | ||
|
||
layerPropertiesDialog::layerPropertiesDialog(QString name, qreal distance) : | ||
QDialog(), | ||
ui(new Ui::layerPropertiesDialog) | ||
{ | ||
ui->setupUi(this); | ||
ui->lineEditName->setText(name); | ||
ui->doubleSpinBoxDistance->setValue(distance); | ||
connect(ui->btnInstructions, &QPushButton::clicked, this, &layerPropertiesDialog::showInstructions); | ||
} | ||
|
||
layerPropertiesDialog::~layerPropertiesDialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void layerPropertiesDialog::showInstructions() | ||
{ | ||
QMessageBox mBox; | ||
} | ||
|
||
QString layerPropertiesDialog::updateName() | ||
{ | ||
return ui->lineEditName->text(); | ||
} | ||
|
||
qreal layerPropertiesDialog::updateDistance() | ||
{ | ||
return ui->doubleSpinBoxDistance->value(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef LAYERPROPERTIESDIALOG_H | ||
#define LAYERPROPERTIESDIALOG_H | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { | ||
class layerPropertiesDialog; | ||
} | ||
|
||
class layerPropertiesDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit layerPropertiesDialog( QString name, qreal distance); | ||
~layerPropertiesDialog(); | ||
|
||
void showInstructions(); | ||
QString updateName(); | ||
qreal updateDistance(); | ||
|
||
private: | ||
Ui::layerPropertiesDialog *ui; | ||
}; | ||
|
||
#endif // LAYERPROPERTIESDIALOG_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>layerPropertiesDialog</class> | ||
<widget class="QDialog" name="layerPropertiesDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>338</width> | ||
<height>157</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Dialog</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout_3"> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<item> | ||
<layout class="QVBoxLayout" name="verticalLayout_2"> | ||
<item> | ||
<widget class="QLabel" name="labName"> | ||
<property name="text"> | ||
<string>Layer name: </string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="labDistance"> | ||
<property name="text"> | ||
<string>Distance to camera:</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="QLineEdit" name="lineEditName"/> | ||
</item> | ||
<item> | ||
<widget class="QDoubleSpinBox" name="doubleSpinBoxDistance"> | ||
<property name="suffix"> | ||
<string> m.</string> | ||
</property> | ||
<property name="minimum"> | ||
<double>1.000000000000000</double> | ||
</property> | ||
<property name="maximum"> | ||
<double>50000.000000000000000</double> | ||
</property> | ||
<property name="singleStep"> | ||
<double>0.500000000000000</double> | ||
</property> | ||
<property name="value"> | ||
<double>10.000000000000000</double> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
<item> | ||
<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> | ||
<item> | ||
<widget class="QPushButton" name="btnInstructions"> | ||
<property name="text"> | ||
<string>Instructions</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<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> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>accepted()</signal> | ||
<receiver>layerPropertiesDialog</receiver> | ||
<slot>accept()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>248</x> | ||
<y>254</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>157</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
<connection> | ||
<sender>buttonBox</sender> | ||
<signal>rejected()</signal> | ||
<receiver>layerPropertiesDialog</receiver> | ||
<slot>reject()</slot> | ||
<hints> | ||
<hint type="sourcelabel"> | ||
<x>316</x> | ||
<y>260</y> | ||
</hint> | ||
<hint type="destinationlabel"> | ||
<x>286</x> | ||
<y>274</y> | ||
</hint> | ||
</hints> | ||
</connection> | ||
</connections> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters