Warning, file /graphics/kxstitch/src/CalibrateFlossDlg.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * Copyright (C) 2010-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 CalibrateFlossDlg_H
0012 #define CalibrateFlossDlg_H
0013 
0014 #include <QColor>
0015 #include <QDialog>
0016 #include <QMap>
0017 #include <QString>
0018 
0019 #include "ui_CalibrateFloss.h"
0020 
0021 class QHideEvent;
0022 class QListWidgetItem;
0023 class QPixmap;
0024 class QShowEvent;
0025 class SchemeManager;
0026 
0027 class CalibrateFlossDlg : public QDialog
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032     CalibrateFlossDlg(QWidget *, const QString &);
0033     ~CalibrateFlossDlg();
0034 
0035 protected:
0036     virtual void hideEvent(QHideEvent *) Q_DECL_OVERRIDE;
0037     virtual void showEvent(QShowEvent *) Q_DECL_OVERRIDE;
0038 
0039 private slots:
0040     void on_SchemeList_currentIndexChanged(const QString &);
0041     void on_ColorList_currentItemChanged(QListWidgetItem *);
0042     void on_RedSlider_valueChanged(int);
0043     void on_GreenSlider_valueChanged(int);
0044     void on_BlueSlider_valueChanged(int);
0045     void on_ResetColor_clicked();
0046     void on_DialogButtonBox_accepted();
0047     void on_DialogButtonBox_rejected();
0048     void on_DialogButtonBox_helpRequested();
0049 
0050 private:
0051     void fillSchemeList();
0052     void fillColorList();
0053     void updateSample();
0054     void updateName(bool modified);
0055     void commitColor();
0056 
0057     Ui::CalibrateFloss ui;
0058 
0059     QString m_schemeName;
0060     QListWidgetItem *m_item;
0061     QColor m_sampleColor;
0062     QPixmap *m_sample;
0063 
0064     typedef QMap<QString, QColor> ChangedColors;
0065     QMap<QString, ChangedColors> m_calibratedColors;
0066 };
0067 
0068 #endif // CalibrateFlossDlg_H