From 14be2d439ed0bf0b3d1389bc6b9174808606974c Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 15 Feb 2015 11:32:55 +0000 Subject: refactoring git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4724 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Ui/skinned/listwidget.h | 51 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 28 deletions(-) (limited to 'src') 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 @@ -38,23 +38,6 @@ namespace PlayListPopup{ class PopupWidget; } -/** - @author Ilya Kotov -*/ -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 */ @@ -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. */ -- cgit v1.2.3-13-gbd6f