File indexing completed on 2024-04-21 04:32:03

0001 /*
0002  * Copyright (C) 2012-2015 by Stephen Allewell
0003  * steve.allewell@gmail.com
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 2 of the License, or
0008  * (at your option) any later version.
0009  */
0010 
0011 #ifndef ConfigurationDialogs_H
0012 #define ConfigurationDialogs_H
0013 
0014 #include "configuration.h"
0015 #include "ui_EditorConfigPage.h"
0016 #include "ui_ImportConfigPage.h"
0017 #include "ui_LibraryConfigPage.h"
0018 #include "ui_PaletteConfigPage.h"
0019 #include "ui_PatternConfigPage.h"
0020 #include "ui_PrinterConfigPage.h"
0021 
0022 class EditorConfigPage : public QWidget, public Ui::EditorConfigPage
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit EditorConfigPage(QWidget *parent, const QString &name);
0028 };
0029 
0030 class PatternConfigPage : public QWidget, public Ui::PatternConfigPage
0031 {
0032     Q_OBJECT
0033 
0034 public:
0035     explicit PatternConfigPage(QWidget *parent, const QString &name);
0036 
0037 protected slots:
0038     void on_kcfg_Editor_ClothCountUnits_activated(int);
0039     void on_kcfg_Document_UnitsFormat_activated(int);
0040     void on_kcfg_Editor_ClothCountLink_toggled(bool);
0041     void on_kcfg_Editor_HorizontalClothCount_valueChanged(double);
0042 
0043 private:
0044     void setPatternSizePrecision();
0045     void setClothCountPrecision();
0046 
0047     Configuration::EnumDocument_UnitsFormat::type m_currentDocumentUnitsIndex;
0048     Configuration::EnumEditor_ClothCountUnits::type m_currentClothCountUnitsIndex;
0049 };
0050 
0051 class PaletteConfigPage : public QWidget, public Ui::PaletteConfigPage
0052 {
0053     Q_OBJECT
0054 
0055 public:
0056     explicit PaletteConfigPage(QWidget *parent, const QString &name);
0057 
0058 public slots:
0059     void defaultClicked();
0060 };
0061 
0062 class ImportConfigPage : public QWidget, public Ui::ImportConfigPage
0063 {
0064     Q_OBJECT
0065 
0066 public:
0067     explicit ImportConfigPage(QWidget *parent, const QString &name);
0068 };
0069 
0070 class LibraryConfigPage : public QWidget, public Ui::LibraryConfigPage
0071 {
0072     Q_OBJECT
0073 
0074 public:
0075     explicit LibraryConfigPage(QWidget *parent, const QString &name);
0076 };
0077 
0078 class PrinterConfigPage : public QWidget, public Ui::PrinterConfigPage
0079 {
0080     Q_OBJECT
0081 
0082 public:
0083     explicit PrinterConfigPage(QWidget *parent, const QString &name);
0084 };
0085 
0086 #endif // ConfigurationDialogs_H