diff options
Diffstat (limited to 'src/plugins/Ui/skinned/playlistselector.h')
| -rw-r--r-- | src/plugins/Ui/skinned/playlistselector.h | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/plugins/Ui/skinned/playlistselector.h b/src/plugins/Ui/skinned/playlistselector.h index 7b140759a..be3082c9d 100644 --- a/src/plugins/Ui/skinned/playlistselector.h +++ b/src/plugins/Ui/skinned/playlistselector.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2015 by Ilya Kotov * + * Copyright (C) 2009-2020 by Ilya Kotov * * forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -31,7 +31,6 @@ class QMouseEvent; class QMenu; class PlayListManager; class PlayList; -class Skin; /** @author Ilya Kotov <forkotov02@ya.ru> @@ -46,9 +45,16 @@ public: private slots: void updateTabs(); - void updateSkin(); private: + enum BUTTON + { + BUTTON_UNKNOWN = -1, + BUTTON_NEW_PL, + BUTTON_LEFT, + BUTTON_RIGHT + }; + void paintEvent(QPaintEvent *) override; void mousePressEvent (QMouseEvent *e) override; void mouseReleaseEvent (QMouseEvent *e) override; @@ -56,38 +62,31 @@ private: void mouseMoveEvent(QMouseEvent *e) override; void resizeEvent (QResizeEvent *) override; void updateOffsets(); - void loadColors(); void drawButtons(); void updateScrollers(); QRect firstVisible(); QRect lastVisible(); int findPlayList(QPoint pos); int findButton(QPoint pos); - PlayListManager *m_pl_manager; - QFontMetrics *m_metrics; + + PlayListManager *m_pl_manager = nullptr; + QFontMetrics *m_metrics = nullptr; QFont m_font; QMenu *m_menu; - bool m_scrollable; + bool m_scrollable = false; QList <QRect> m_rects; QList <QRect> m_extra_rects; - Skin *m_skin; - QColor m_normal, m_current, m_normal_bg, m_selected_bg; + QColor m_normal, m_current, m_normal_bg, m_selected_bg, m_selected_text, m_current_bg; QPixmap m_pixmap; bool m_show_new_pl_button; - int m_offset, m_offset_max, m_press_offset; - bool m_moving; + int m_offset = 0, m_offset_max = 0, m_press_offset = -1; + bool m_moving = false; QPoint m_mouse_pos; QString m_pl_separator; QString m_pl_button; - int m_pressed_button; + int m_pressed_button = BUTTON_UNKNOWN; + - enum BUTTON - { - BUTTON_UNKNOWN = -1, - BUTTON_NEW_PL, - BUTTON_LEFT, - BUTTON_RIGHT - }; }; #endif // PLAYLISTSELECTOR_H |
