QElectroTech  0.70
elementspanelwidget.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef ELEMENTS_PANEL_WIDGET_H
19 #define ELEMENTS_PANEL_WIDGET_H
20 
21 #include "elementspanel.h"
22 
28 class ElementsPanelWidget : public QWidget {
29  Q_OBJECT
30 
31  // constructors, destructor
32  public:
33  ElementsPanelWidget(QWidget * = nullptr);
34  ~ElementsPanelWidget() override;
35 
36  private:
38 
39  // attributes
40  private:
44  QAction *tbt_add, *tbt_edit, *tbt_remove;
45  QMenu *context_menu;
46  QLineEdit *filter_textfield;
47 
48  // methods
49  public:
50  inline ElementsPanel &elementsPanel() const;
51 
52  signals:
53  void requestForDiagram(Diagram *);
65 
66  public slots:
69  void reloadAndFilter();
70  void activateProject();
71  void closeProject();
72  void editProjectProperties();
73  void editDiagramProperties();
74  void newDiagram();
75  void deleteDiagram();
76  void moveDiagramUp();
77  void moveDiagramDown();
78  void moveDiagramUpTop();
79  void moveDiagramUpx10();
80  void moveDiagramDownx10();
81  void addTitleBlockTemplate();
84  void updateButtons();
85  void handleContextMenu(const QPoint &);
86  void filterEdited(const QString &);
87 
88  protected:
89  void keyPressEvent (QKeyEvent *e) override;
90 
91  private:
93 };
94 
99  return(*elements_panel);
100 }
101 
102 #endif
ElementsPanel * elements_panel
void requestForDiagramPropertiesEdition(Diagram *)
void requestForDiagramDeletion(Diagram *)
void requestForNewDiagram(QETProject *)
ElementsPanel & elementsPanel() const
void requestForProjectClosing(QETProject *)
void requestForDiagramMoveUpTop(Diagram *)
void requestForDiagramMoveDown(Diagram *)
void requestForDiagramMoveUp(Diagram *)
void filterEdited(const QString &)
void requestForDiagram(Diagram *)
void handleContextMenu(const QPoint &)
void requestForProjectPropertiesEdition(QETProject *)
ElementsPanelWidget(QWidget *=nullptr)
void requestForDiagramMoveDownx10(Diagram *)
void requestForDiagramMoveUpx10(Diagram *)
void keyPressEvent(QKeyEvent *e) override
void requestForProject(QETProject *)
QAction * prj_move_diagram_downx10