PageRenderTime 20ms CodeModel.GetById 16ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

/Primitive/MainApp/drawingpropertiesdlg.h

https://bitbucket.org/flexcomputer/primitive
C Header | 53 lines | 43 code | 10 blank | 0 comment | 0 complexity | a5a73f19d35e7c08eeea4f73ada0dca4 MD5 | raw file
 1#ifndef DRAWINGPROPERTIESDLG_H
 2#define DRAWINGPROPERTIESDLG_H
 3
 4#include <QDialog>
 5#include <QPushButton>
 6#include <QLabel>
 7#include <QLineEdit>
 8#include <QComboBox>
 9#include "settings.h"
10
11class DrawingPropertiesDlg : public QDialog
12{
13    Q_OBJECT
14public:
15    explicit DrawingPropertiesDlg(QWidget *parent = 0, QString drawingName = QString(),
16                                  QString authorName = QString(),
17                                  int drawingUnit = 0);
18    
19    void setTitle(QString title) { this->setWindowTitle(title); }
20    QString drawingName() const { return _drawingName; }
21    QString authorName() const { return _authorName; }
22    DistanceUnit unit() const { return _unit; }
23
24    void setDrawingName(QString name) { _drawingName = name; }
25    void setAuthorName(QString name) { _authorName = name; }
26    void setDistanceUnit(DistanceUnit unit) { _unit = unit; }
27
28protected:
29    QString _drawingName;
30    QString _authorName;
31    DistanceUnit _unit;
32
33protected:
34    QLabel* nameLabel;
35    QLabel* authorLabel;
36    QLabel* unitLabel;
37    QLineEdit* drawingNameEdit;
38    QLineEdit* authorEdit;
39    QComboBox* unitBox;
40    QPushButton* saveButton;
41    QPushButton* defaultsButton;
42    QPushButton* cancelButton;
43
44signals:
45    
46public slots:
47    void saveClicked();
48    void defaultsClicked();
49    void cancelClicked();
50    
51};
52
53#endif // DRAWINGPROPERTIESDLG_H