driveritem.h
00001 /* 00002 * This file is part of the KDE libraries 00003 * Copyright (c) 2001 Michael Goffioul <kdeprint@swing.be> 00004 * 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License version 2 as published by the Free Software Foundation. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 **/ 00020 00021 #ifndef DRIVERITEM_H 00022 #define DRIVERITEM_H 00023 00024 #include <qlistview.h> 00025 00026 class DrBase; 00027 00028 class DriverItem : public QListViewItem 00029 { 00030 public: 00031 DriverItem(QListView *parent, DrBase *item); 00032 DriverItem(QListViewItem *parent, QListViewItem *after, DrBase *item); 00033 00034 void updateText(); 00035 void updateTextRecursive(); 00036 DrBase* drItem() const { return m_item; } 00037 bool hasConflict() { return m_conflict; } 00038 bool updateConflict(); 00039 00040 void paintCell(QPainter*, const QColorGroup&, int, int, int); 00041 00042 private: 00043 DrBase *m_item; 00044 bool m_conflict; 00045 }; 00046 00047 #endif