LibreCAD
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
addlayerdialog.h
Go to the documentation of this file.
1 #pragma once
2 #include <cad/document/document.h>
3 
4 #include <QDialog>
5 #include <QColorDialog>
6 #include <QToolTip>
7 #include <QFormLayout>
8 
11 #include "widgets/colorselect.h"
12 
13 #include <cad/meta/layer.h>
14 #include <cad/meta/metalinewidth.h>
15 
16 namespace Ui {
17  class AddLayerDialog;
18 }
22 class AddLayerDialog : public QDialog {
23  Q_OBJECT
24 
25  public:
31  AddLayerDialog(lc::Document_SPtr document, QWidget* parent = 0);
32 
39  AddLayerDialog(lc::Layer_CSPtr oldLayer, lc::Document_SPtr document, QWidget* parent = 0);
41 
42  signals:
43  void newLayer(lc::Layer_CSPtr);
44  void editLayer(lc::Layer_CSPtr oldLayer, lc::Layer_CSPtr newLayer);
45 
46  private slots:
52  void accept();
53 
54  protected:
55  Ui::AddLayerDialog* ui;
59 
60  private:
61  lc::Layer_CSPtr _oldLayer;
62 };
lc::ui::ColorSelect * colorSelect
void editLayer(lc::Layer_CSPtr oldLayer, lc::Layer_CSPtr newLayer)
void accept()
Create layer This function is called when "Ok" button is pressed. It creates the layer according to t...
Dropdown select for line widths. Line widths are hardcoded in the constructor.
lc::Layer_CSPtr _oldLayer
Ui::AddLayerDialog * ui
AddLayerDialog(lc::Document_SPtr document, QWidget *parent=0)
Create empty dialog.
Dropdown select for DxfLinePatterns.
lc::ui::LinePatternSelect * linePatternSelect
Create a dialog with all required fields to create a new layer.
lc::ui::LineWidthSelect * lineWidthSelect
void newLayer(lc::Layer_CSPtr)