aboutsummaryrefslogtreecommitdiff
path: root/tools/CurveEditor/source/Internal/Window/AlphaDialog.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
committerBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
commite1bf674c16e3c8472b29574159c789cd3f0c64e0 (patch)
tree9f0cfce09c71a2c27ff19589fcad6cd83504477c /tools/CurveEditor/source/Internal/Window/AlphaDialog.h
parentfirst commit (diff)
downloadblast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.tar.xz
blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.zip
Updating to [email protected] and [email protected] with a new directory structure.
NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this.
Diffstat (limited to 'tools/CurveEditor/source/Internal/Window/AlphaDialog.h')
-rw-r--r--tools/CurveEditor/source/Internal/Window/AlphaDialog.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/tools/CurveEditor/source/Internal/Window/AlphaDialog.h b/tools/CurveEditor/source/Internal/Window/AlphaDialog.h
new file mode 100644
index 0000000..985d0b4
--- /dev/null
+++ b/tools/CurveEditor/source/Internal/Window/AlphaDialog.h
@@ -0,0 +1,47 @@
+#ifndef ALPHADIALOG_H
+#define ALPHADIALOG_H
+
+#include <QtWidgets/QDialog>
+
+namespace Ui {
+ class AlphaDialog;
+}
+
+namespace nvidia {
+namespace CurveEditor {
+
+class AlphaDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ static int getAlpha(int alpha = 255, QWidget *parent = 0);
+
+ explicit AlphaDialog(QWidget *parent = 0, int alpha = 255);
+ ~AlphaDialog();
+
+protected:
+ // QWidget events
+ virtual void paintEvent(QPaintEvent * e);
+
+ virtual void mousePressEvent(QMouseEvent* e);
+ virtual void mouseReleaseEvent(QMouseEvent* e);
+ virtual void mouseMoveEvent(QMouseEvent* e);
+private slots:
+ void on_spinBoxAlpha_valueChanged(int arg1);
+
+private:
+ void drawAlphaRectangle(QPainter& painter);
+ void drawCursor(QPainter& painter, int xPos);
+
+private:
+ Ui::AlphaDialog *ui;
+ bool _drag;
+ int _alpha;
+ int _xOffset;
+};
+
+} // namespace CurveEditor
+} // namespace nvidia
+
+#endif // ALPHADIALOG_H