All Classes Namespaces Functions Variables Enumerations Properties Pages
pegbaralignmentdialog.h
1 /*
2 
3 Pencil2D - Traditional Animation Software
4 Copyright (C) 2005-2007 Patrick Corrieri & Pascal Naidon
5 Copyright (C) 2012-2020 Matthew Chiawen Chang
6 
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; version 2 of the License.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 */
17 #ifndef PEGBARALIGNMENTDIALOG_H
18 #define PEGBARALIGNMENTDIALOG_H
19 
20 #include <QDialog>
21 #include <QStringList>
22 #include "editor.h"
23 
24 namespace Ui {
26 }
27 
29 {
30  Q_OBJECT
31 
32 public:
33  explicit PegBarAlignmentDialog(Editor* editor, QWidget* parent = nullptr);
35 
36 public slots:
37  void updateAlignButton();
38 
39 private:
40  void updatePegRegLayers();
41  void updatePegRegDialog();
42  void alignPegs();
43  void setLayerList(QStringList layerList);
44  void updateRefKeyLabel(QString text);
45 
46  QStringList getLayerList();
47 
48  void setAreaSelected(bool b);
49  void setReferenceSelected(bool b);
50  void setLayerSelected(bool b);
51  void closeClicked();
52 
53  Ui::PegBarAlignmentDialog* ui;
54  QStringList mLayernames;
55  Editor* mEditor = nullptr;
56  bool mAreaSelected = false;
57  bool mReferenceSelected = false;
58  bool mLayerSelected = false;
59 };
60 
61 #endif // PEGBARALIGNMENTDIALOG_H
Q_OBJECTQ_OBJECT
Definition: editor.h:55
QObject * parent() const const