~feng-kylin/youker-assistant/youker-assistant

« back to all changes in this revision

Viewing changes to component/kylinlistwidgetitem.cpp

  • Committer: kobe
  • Date: 2015-02-13 07:37:10 UTC
  • Revision ID: xiangli@ubuntukylin.com-20150213073710-0jyp02ilyi5njj10
Qt Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "kylinlistwidgetitem.h"
 
2
#include <QPen>
 
3
#include <QLinearGradient>
 
4
#include "mainwindow.h"
 
5
#include <QDebug>
 
6
 
 
7
KylinListWidgetItem::KylinListWidgetItem(const QIcon &icon, const QString &text, QListWidget *view, int type)
 
8
    :QListWidgetItem(icon,text,view,type)
 
9
{
 
10
    mainwindow = NULL;
 
11
}
 
12
 
 
13
KylinListWidgetItem::~KylinListWidgetItem()
 
14
{
 
15
}
 
16
 
 
17
void KylinListWidgetItem::setOver(bool flag)
 
18
{
 
19
    if(flag != is_over)
 
20
    {
 
21
        is_over = flag;
 
22
        listWidget()->update();
 
23
    }
 
24
}
 
25
 
 
26
void KylinListWidgetItem::setPress(bool flag)
 
27
{
 
28
    if(flag != is_press)
 
29
    {
 
30
        is_press = flag;
 
31
        listWidget()->update();
 
32
    }
 
33
}
 
34
 
 
35
void KylinListWidgetItem::painter()
 
36
{
 
37
    mainwindow->reViewThePointSkin(point_skin);
 
38
}