//QSuperList 1.1 class definition. See plaintext.txt for licensing
//copyright 2000, Spanware, Inc.
//by David Koretzky
#ifndef _QSUPERLIST_H_
#define _QSUPERLIST_H_
#include <qwidget.h>
#include <qlistbox.h>
#include <qframe.h>
#include <qpushbutton.h>
#include <qstring.h>
enum QDirection {baTop, baBottom, baLeft, baRight};
class QSuperList : public QFrame
{
Q_OBJECT
private:
QListBox* listBox;
QPushButton* btnAdd;
QPushButton* btnDelete;
unsigned int m_nMaxValues; //max amount allowed in listbox
unsigned int m_nMaxLength; //max allowable length of string;
unsigned int m_nButtonSize; //size of + - buttons
QDirection m_buttonAlignment;
bool m_bAllowBlanks; //will you allow blank values?
bool CheckLength(QString str);
void EnableButtons();
public:
QSuperList(QWidget* parent=0, const char * name=0, WFlags f=0);
~QSuperList();
void alignButtons(QDirection d);
void addItem(QString str);
bool getAllowBlanks() const;
unsigned int getButtonSize() const;
QListBox* getListBox();
int getMaxLength() const;
int getMaxValues() const;
void setAllowBlanks(bool b);
void setButtonSize(unsigned int size);
void setMaxLength(int maxLength);
void setMaxValues(int maxValues);
void clear();
public slots:
void AddClicked();
void DeleteClicked();
void ListBoxDoubleClicked(int index);
void show();
};
#endif
Documentation generated by root@rustycage.newdamage.com on Tue Jun 13 23:08:33 EDT 2000