diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-02-15 11:32:55 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2015-02-15 11:32:55 +0000 |
| commit | 14be2d439ed0bf0b3d1389bc6b9174808606974c (patch) | |
| tree | eef46acb5114433c53a5de4d1e6e6cb71133b42b /src/plugins/Ui/skinned | |
| parent | e49fef2b19e7bcc4ccb47dfce64723cfed99d3a2 (diff) | |
| download | qmmp-14be2d439ed0bf0b3d1389bc6b9174808606974c.tar.gz qmmp-14be2d439ed0bf0b3d1389bc6b9174808606974c.tar.bz2 qmmp-14be2d439ed0bf0b3d1389bc6b9174808606974c.zip | |
refactoring
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4724 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Ui/skinned')
| -rw-r--r-- | src/plugins/Ui/skinned/listwidget.h | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/src/plugins/Ui/skinned/listwidget.h b/src/plugins/Ui/skinned/listwidget.h index 5a95e7e42..bb6ddcc4c 100644 --- a/src/plugins/Ui/skinned/listwidget.h +++ b/src/plugins/Ui/skinned/listwidget.h @@ -41,23 +41,6 @@ class PopupWidget; /** @author Ilya Kotov <forkotov02@hotmail.ru> */ -struct ListWidgetRow -{ - QString title; - QString length; - QString extraString; - int number; - bool separator; - bool selected; - bool current; - //geometry - int bgY; //top of the background - int textY; //base line of the text -}; - -/** - @author Ilya Kotov <forkotov02@hotmail.ru> -*/ class ListWidget : public QWidget { Q_OBJECT @@ -114,19 +97,37 @@ private slots: void scrollToCurrent(); private: + struct ListWidgetRow + { + QString title; + QString length; + QString extraString; + int number; + bool separator; + bool selected; + bool current; + //geometry + int bgY; //top of the background + int textY; //base line of the text + }; + enum ScrollDirection + { + NONE = 0,TOP,DOWN + }; + void drawBackground(QPainter *painter, int i); void drawSeparator(QPainter *painter, ListWidgetRow *row, bool rtl); void drawTrack(QPainter *painter, ListWidgetRow *row, bool rtl); - void loadColors(); - bool m_update; - int m_pressed_index; - QMenu *m_menu; - PlayListModel *m_model; /*! * Returns string with queue number or(and) repeate flag for the item number \b i. */ const QString getExtraString(int i); + + bool m_update; + int m_pressed_index; + QMenu *m_menu; + PlayListModel *m_model; int m_row_count, m_first; QFont m_font, m_extra_font; QFontMetrics *m_metrics; @@ -134,12 +135,6 @@ private: Skin *m_skin; QColor m_normal, m_current, m_normal_bg, m_selected_bg; int m_anchor_index; - - enum ScrollDirection - { - NONE = 0,TOP,DOWN - }; - /*! * Scroll direction that is preforming in current moment. */ |
