aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpinfowindow.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpinfowindow.hpp')
-rw-r--r--qmidiplayer-desktop/qmpinfowindow.hpp65
1 files changed, 33 insertions, 32 deletions
diff --git a/qmidiplayer-desktop/qmpinfowindow.hpp b/qmidiplayer-desktop/qmpinfowindow.hpp
index 6a179af..7e09b8a 100644
--- a/qmidiplayer-desktop/qmpinfowindow.hpp
+++ b/qmidiplayer-desktop/qmpinfowindow.hpp
@@ -10,50 +10,51 @@
#include <QHideEvent>
#include "../include/qmpcorepublic.hpp"
-namespace Ui {
- class qmpInfoWindow;
+namespace Ui
+{
+class qmpInfoWindow;
}
class QClickableLabel : public QLabel
{
- Q_OBJECT
- public:
- explicit QClickableLabel(QWidget *parent=0):QLabel(parent){}
- protected:
- void mousePressEvent(QMouseEvent *e)
- {
- QLabel::mousePressEvent(e);
- if(e->buttons()&Qt::LeftButton)
- QApplication::clipboard()->setText(text());
- }
+ Q_OBJECT
+public:
+ explicit QClickableLabel(QWidget *parent = nullptr) : QLabel(parent) {}
+protected:
+ void mousePressEvent(QMouseEvent *e)
+ {
+ QLabel::mousePressEvent(e);
+ if (e->buttons() & Qt::LeftButton)
+ QApplication::clipboard()->setText(text());
+ }
};
class qmpInfoWindow;
-class qmpInfoFunc:public qmpFuncBaseIntf
+class qmpInfoFunc : public qmpFuncBaseIntf
{
- private:
- qmpInfoWindow *p;
- public:
- qmpInfoFunc(qmpInfoWindow *par);
- void show();
- void close();
+private:
+ qmpInfoWindow *p;
+public:
+ qmpInfoFunc(qmpInfoWindow *par);
+ void show();
+ void close();
};
class qmpInfoWindow : public QDialog
{
- Q_OBJECT
-
- public:
- explicit qmpInfoWindow(QWidget *parent = 0);
- ~qmpInfoWindow();
- void closeEvent(QCloseEvent *e);
- void hideEvent(QHideEvent *e);
- public slots:
- void updateInfo();
-
- private:
- Ui::qmpInfoWindow *ui;
- qmpInfoFunc *infof;
+ Q_OBJECT
+
+public:
+ explicit qmpInfoWindow(QWidget *parent = nullptr);
+ ~qmpInfoWindow();
+ void closeEvent(QCloseEvent *e);
+ void hideEvent(QHideEvent *e);
+public slots:
+ void updateInfo();
+
+private:
+ Ui::qmpInfoWindow *ui;
+ qmpInfoFunc *infof;
};
#endif // QMPINFOWINDOW_HPP