Updated Ukrainian translation.
[LameXP.git] / src / Dialog_DropBox.h
blob4fb532162f09f4447d2c41dc4a6cd3d73a9baedd
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2012 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.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
22 #pragma once
24 #include <QDialog>
26 //UIC forward declartion
27 namespace Ui {
28 class DropBox;
31 //Class declarations
32 class QAbstractItemModel;
33 class QDragEnterEvent;
34 class QLabel;
35 class QMouseEvent;
36 class QPoint;
37 class SettingsModel;
39 //DropBox class
40 class DropBox: public QDialog
42 Q_OBJECT
44 public:
45 DropBox(QWidget *parent = 0, QAbstractItemModel *model = 0, SettingsModel *settings = 0);
46 ~DropBox(void);
48 private:
49 Ui::DropBox *ui; //for Qt UIC
51 bool m_canClose;
52 QPoint *m_mouseReferencePoint;
53 QPoint *m_windowReferencePoint;
54 QLabel *m_counterLabel;
55 QAbstractItemModel *m_model;
56 SettingsModel *m_settings;
57 bool m_moving;
58 bool m_firstShow;
60 protected:
61 void keyPressEvent(QKeyEvent *event);
62 void keyReleaseEvent(QKeyEvent *event);
63 void closeEvent(QCloseEvent *event);
64 void showEvent(QShowEvent *event);
65 void mousePressEvent(QMouseEvent *event);
66 void mouseMoveEvent(QMouseEvent *event);
67 void mouseReleaseEvent(QMouseEvent *event);
68 void changeEvent(QEvent *e);
69 bool event(QEvent *event);
71 public slots:
72 void modelChanged(void);
73 void showToolTip(void);