| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef GEAR_H |
| #define GEAR_H |
|
|
| #include "qc_plugininterface.h" |
| #include <QDialog> |
| #include <QSettings> |
|
|
| class QPointF; |
| class QSpinBox; |
| class QCheckBox; |
| class QDoubleSpinBox; |
| class QComboBox; |
|
|
| class lc_Geardlg : public QDialog |
| { |
| Q_OBJECT |
|
|
| public: |
| explicit lc_Geardlg(QWidget *parent); |
| virtual ~lc_Geardlg(); |
|
|
| public slots: |
| void processAction(Document_Interface *doc, const QString& cmd, QPointF& center); |
| void checkAccept(); |
|
|
| protected: |
| void closeEvent(QCloseEvent *event) override; |
|
|
| private: |
| void readSettings(); |
| void writeSettings(); |
|
|
| private: |
|
|
| QSettings settings; |
|
|
| QDoubleSpinBox *rotateBox {nullptr}; |
| QSpinBox *nteethBox {nullptr}; |
| QDoubleSpinBox *modulusBox {nullptr}; |
| QDoubleSpinBox *pressureBox {nullptr}; |
| QDoubleSpinBox *addendumBox {nullptr}; |
| QDoubleSpinBox *dedendumBox {nullptr}; |
| QSpinBox *n1Box {nullptr}; |
| QSpinBox *n2Box {nullptr}; |
| QCheckBox *drawAllTeethBox {nullptr}; |
| QCheckBox *drawBothSidesOfToothBox {nullptr}; |
| QCheckBox *useLayersBox {nullptr}; |
| QCheckBox *drawAddendumCircleBox {nullptr}; |
| QCheckBox *drawPitchCircleBox {nullptr}; |
| QCheckBox *drawBaseCircleBox {nullptr}; |
| QCheckBox *drawRootCircleBox {nullptr}; |
| QCheckBox *drawPressureLineBox {nullptr}; |
| QCheckBox *drawPressureLimitBox {nullptr}; |
| QCheckBox *calcInterferenceBox {nullptr}; |
| QSpinBox *n3Box {nullptr}; |
| }; |
|
|
| class LC_Gear : public QObject, QC_PluginInterface |
| { |
| Q_OBJECT |
| Q_INTERFACES(QC_PluginInterface) |
| Q_PLUGIN_METADATA(IID LC_DocumentInterface_iid FILE "gear.json") |
|
|
| lc_Geardlg *parameters_dialog {nullptr}; |
|
|
| public: |
|
|
| virtual PluginCapabilities getCapabilities() const Q_DECL_OVERRIDE; |
| virtual QString name() const Q_DECL_OVERRIDE; |
| virtual void execComm(Document_Interface *doc, |
| QWidget *parent, QString cmd) Q_DECL_OVERRIDE; |
| }; |
|
|
| #endif |
|
|