Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / panoply_preview / panoply_preview.h
blob8cebfa1a60138238afdd47cb302ebd34a2e904a7
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2014-2016 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef NLTOOLS_PANOPLY_PREVIEW_H
18 #define NLTOOLS_PANOPLY_PREVIEW_H
19 #include <nel/misc/types_nl.h>
21 // STL includes
23 // Qt includes
24 #include <QWidget>
25 #include <QTextEdit>
26 #include <QLineEdit>
27 #include <QSlider>
28 #include <QImage>
29 #include <QPixmap>
31 // NeL includes
32 #include <nel/misc/log.h>
33 #include <nel/misc/displayer.h>
35 // Project includes
37 namespace NLMISC {
38 class CBitmap;
39 class IThread;
42 namespace NLTOOLS {
43 class CMainWindow;
44 class CColorThread;
46 /**
47 * CPanoplyPreview
48 * \brief CPanoplyPreview
49 * \date 2014-09-19 09:38GMT
50 * \author Jan BOON (jan.boon@kaetemi.be)
52 class CPanoplyPreview : public QWidget
54 Q_OBJECT
56 public:
57 CPanoplyPreview(CMainWindow *parent);
58 virtual ~CPanoplyPreview();
60 void displayBitmap(const NLMISC::CBitmap &bitmap); // Called from thread!
62 protected:
63 virtual void paintEvent(QPaintEvent *e);
65 signals:
66 void tSigBitmap();
68 private slots:
69 void tSlotBitmap();
71 void colorEdited(const QString &text);
72 void maskEdited(const QString &text);
73 void goPushed(bool);
75 void hueChanged(int value);
76 void lightnessChanged(int value);
77 void saturationChanged(int value);
78 void luminosityChanged(int value);
79 void contrastChanged(int value);
81 private:
82 void createDockWindows(CMainWindow *mainWindow);
84 private:
85 NLMISC::IThread *m_Thread;
86 CColorThread *m_ColorThread;
88 QString m_ColorFile;
89 QString m_MaskFile;
91 QImage *m_Image;
92 QPixmap *m_Pixmap;
94 NLMISC::CMutex m_ImageMutex;
96 private:
97 CPanoplyPreview(const CPanoplyPreview &);
98 CPanoplyPreview &operator=(const CPanoplyPreview &);
100 }; /* class CPanoplyPreview */
102 class CSliderTextEdit : public QSlider
104 Q_OBJECT
106 public:
107 CSliderTextEdit(QWidget *parent, QLineEdit *lineEdit, float scale);
108 virtual ~CSliderTextEdit();
110 private slots:
111 void lineEditTextEdited(const QString &text);
112 void sliderValueChanged(int value);
114 private:
115 QLineEdit *m_LineEdit;
116 bool m_Updating;
117 float m_Scale;
121 } /* namespace NLTOOLS */
123 #endif /* #ifndef NLTOOLS_PANOPLY_PREVIEW_H */
125 /* end of file */