LibreCAD
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
linepatternmanager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cad/document/document.h>
4 
5 #include <QDialog>
6 #include <QHeaderView>
7 
10 
11 namespace Ui {
12  class LinePatternManager;
13 }
17 class LinePatternManager : public QDialog {
18  Q_OBJECT
19 
20  public:
26  LinePatternManager(lc::Document_SPtr document, QWidget* parent = 0);
28 
35  void setDocument(lc::Document_SPtr document);
36 
37  private slots:
43  void on_editButton_pressed();
49  void on_newButton_pressed();
55  void on_lpView_doubleClicked(const QModelIndex& index);
56 
57  private:
61  void updateModel();
62 
63  Ui::LinePatternManager* ui;
64  lc::Document_SPtr _document;
66 
67  void on_addLinePatternEvent(const lc::AddLinePatternEvent&);
68  void on_removeLinePatternEvent(const lc::RemoveLinePatternEvent&);
69  void on_replaceLinePatternEvent(const lc::ReplaceLinePatternEvent&);
70 };
lc::Document_SPtr _document
void on_editButton_pressed()
Create update dialog. This function is called when "Edit" button is pressed. It create a new dialog p...
LinePatternManager(lc::Document_SPtr document, QWidget *parent=0)
Create window.
void on_removeLinePatternEvent(const lc::RemoveLinePatternEvent &)
void on_newButton_pressed()
Create new line pattern dialog. It create a new dialog to create a line pattern. This function is cal...
void on_lpView_doubleClicked(const QModelIndex &index)
Create update dialog. It create a new dialog pre-filled with the line pattern information. This function is called when an element of the list is double clicked.
Ui::LinePatternManager * ui
Model to display a list of DxfLinePatterns in a QTableView. Show preview, name and description...
Create a new window which shows a list of line patterns.
void on_addLinePatternEvent(const lc::AddLinePatternEvent &)
void setDocument(lc::Document_SPtr document)
Set a new document and update the list of line patterns. Document can be set to nullptr to clear the ...
LinePatternModel * _model
void on_replaceLinePatternEvent(const lc::ReplaceLinePatternEvent &)
void updateModel()
Refresh line patterns list.