45 #include <QtGui/qframe.h> 46 #include <QtGui/qicon.h> 73 void removeItem(
int index);
76 bool isItemEnabled(
int index)
const;
81 void setItemIcon(
int index,
const QIcon &icon);
89 int currentIndex()
const;
96 void setCurrentIndex(
int index);
100 void currentChanged(
int index);
104 virtual void itemInserted(
int index);
105 virtual void itemRemoved(
int index);
111 QT3_SUPPORT_CONSTRUCTOR
QToolBox(
QWidget *parent,
const char *
name, Qt::WindowFlags f = 0);
112 inline QT3_SUPPORT
void setItemLabel(
int index,
const QString &
text) { setItemText(index, text); }
113 inline QT3_SUPPORT
QString itemLabel(
int index)
const {
return itemText(index); }
114 inline QT3_SUPPORT
QWidget *currentItem()
const {
return widget(currentIndex()); }
115 inline QT3_SUPPORT
void setCurrentItem(
QWidget *item) { setCurrentIndex(indexOf(item)); }
116 inline QT3_SUPPORT
void setItemIconSet(
int index,
const QIcon &icon) { setItemIcon(index, icon); }
117 inline QT3_SUPPORT
QIcon itemIconSet(
int index)
const {
return itemIcon(index); }
118 inline QT3_SUPPORT
int removeItem(
QWidget *item)
119 {
int i = indexOf(item); removeItem(i);
return i; }
121 QT3_SUPPORT
void setMargin(
int margin) {
setContentsMargins(margin, margin, margin, margin); }
122 QT3_SUPPORT
int margin()
const 123 {
int margin;
int dummy;
getContentsMargins(&margin, &dummy, &dummy, &dummy);
return margin; }
135 {
return insertItem(-1, item,
QIcon(), text); }
138 {
return insertItem(-1, item, iconSet, text); }
140 {
return insertItem(index, item,
QIcon(), text); }
142 #endif // QT_NO_TOOLBOX
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
#define Q_PRIVATE_SLOT(d, signature)
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void changeEvent(QEvent *)
This event handler can be reimplemented to handle state changes.
The QShowEvent class provides an event that is sent when a widget is shown.
bool event(QEvent *e)
Reimplemented Function
#define Q_DECLARE_PRIVATE(Class)
The QEvent class is the base class of all event classes.
The QFrame class is the base class of widgets that can have a frame.
The QIcon class provides scalable icons in different modes and states.