/***************************************************************************
extlistbox.h - description
-------------------
begin : Thu Jun 8 2000
copyright : (C) 2000 by jade
email : donoghue@chariot.net.au
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef EXTLISTBOX_H
#define EXTLISTBOX_H
#include <qwidget.h>
#include <qlistbox.h>
/**extended listbox widget to cater for color
text in the knapster console
*@author jade
*/
class ExtListBox : public QListBox
{
Q_OBJECT
public:
typedef enum { None,Info,Message,Error } LineType;
ExtListBox(QWidget *parent=0, const char *name=0);
virtual ~ExtListBox();
void insertLine(QString s,LineType=None);
void clear();
// void setBG(const QColor &c);
// virtual void setBackgroundColor ( const QColor & );
void setCols(const QColor &norm,const QColor &info,const QColor &msg,const QColor &err);
private:
QColor getTypeColor(LineType t) const;
protected:
// void repaint ( int x, int y, int w, int h, bool erase=true );
private:
// QColor bg;
QColor normalcol,infocol,messagecol,errorcol;
};
#endif
| Generated by: jade@lost on Sat Jun 10 14:35:26 2000, using kdoc 2.0a22. |