The information whether an encoder supports "native" resampling is provided via Abstr...
[LameXP.git] / src / Dialog_DropBox.h
blobfccdbd291177e0e6021b9f324087dfe5d88e83a8
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2016 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version, but always including the *additional*
9 // restrictions defined in the "License.txt" file.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this program; if not, write to the Free Software Foundation, Inc.,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // http://www.gnu.org/licenses/gpl-2.0.txt
21 ///////////////////////////////////////////////////////////////////////////////
23 #pragma once
25 #include <QDialog>
27 //UIC forward declartion
28 namespace Ui {
29 class DropBox;
32 //Class declarations
33 class QAbstractItemModel;
34 class QDragEnterEvent;
35 class QLabel;
36 class QMouseEvent;
37 class QPoint;
38 class SettingsModel;
40 //DropBox class
41 class DropBox: public QDialog
43 Q_OBJECT
45 public:
46 DropBox(QWidget *parent = 0, QAbstractItemModel *model = 0, SettingsModel *settings = 0);
47 ~DropBox(void);
49 private:
50 Ui::DropBox *ui; //for Qt UIC
52 bool m_canClose;
53 QPoint *m_mouseReferencePoint;
54 QPoint *m_windowReferencePoint;
55 QLabel *m_counterLabel;
56 QAbstractItemModel *const m_model;
57 SettingsModel *const m_settings;
58 bool m_moving;
59 bool m_firstShow;
60 QRect m_screenGeometry;
62 static void boundWidget(QWidget *widget);
64 protected:
65 void keyPressEvent(QKeyEvent *event);
66 void keyReleaseEvent(QKeyEvent *event);
67 void closeEvent(QCloseEvent *event);
68 void showEvent(QShowEvent *event);
69 void mousePressEvent(QMouseEvent *event);
70 void mouseMoveEvent(QMouseEvent *event);
71 void mouseReleaseEvent(QMouseEvent *event);
72 void changeEvent(QEvent *e);
73 bool event(QEvent *event);
75 public slots:
76 void modelChanged(void);
77 void showToolTip(void);