43 #include "q3widgetstack.h" 45 #include <q3listview.h> 46 #include <q3textedit.h> 47 #include <q3iconview.h> 48 #include <q3listbox.h> 97 static Q3ListViewItem *
findLVItem(Q3ListView* listView,
int child)
100 Q3ListViewItemIterator
it(listView);
101 Q3ListViewItem *item = it.current();
102 while (item &&
id < child) {
124 return (Q3ListView*)
widget();
136 while (it.current()) {
137 if (it.current() == item)
159 while (it.current()) {
170 if (!child || t !=
Name)
176 return item->text(0);
191 Q3ListViewItem *item;
195 if (item->isSelectable()) {
196 if (
listView()->selectionMode() == Q3ListView::Multi)
198 else if (
listView()->selectionMode() == Q3ListView::Extended)
200 else if (
listView()->selectionMode() == Q3ListView::Single)
202 if (item->isSelected())
207 if (item ==
listView()->currentItem())
210 if (item->childCount()) {
216 if (!
listView()->itemRect(item).isValid())
219 if (item->rtti() == Q3CheckListItem::RTTI) {
220 if (((Q3CheckListItem*)item)->isOn())
263 if (!child || (extend &&
264 listView()->selectionMode() != Q3ListView::Extended &&
265 listView()->selectionMode() != Q3ListView::Multi))
274 Q3ListViewItem *current =
listView()->currentItem();
277 bool down = item->itemPos() > current->itemPos();
278 Q3ListViewItemIterator
it(current);
279 while (it.current()) {
280 listView()->setSelected(it.current(), on);
281 if (it.current() == item)
306 while (it.current()) {
307 if (it.current()->isSelected()) {
310 array[(int)size-1] =
id;
327 static Q3IconViewItem *
findIVItem(Q3IconView *iconView,
int child)
330 Q3IconViewItem *item = iconView->firstItem();
331 while (item &&
id < child) {
332 item = item->nextItem();
353 return (Q3IconView*)
widget();
382 if (!child || t !=
Name)
403 Q3IconViewItem *item;
407 if (item->isSelectable()) {
408 if (
iconView()->selectionMode() == Q3IconView::Multi)
410 else if (
iconView()->selectionMode() == Q3IconView::Extended)
412 else if (
iconView()->selectionMode() == Q3IconView::Single)
414 if (item->isSelected())
421 if (item ==
iconView()->currentItem())
456 if (!child || (extend &&
457 iconView()->selectionMode() != Q3IconView::Extended &&
458 iconView()->selectionMode() != Q3IconView::Multi))
465 iconView()->setSelected(item, on,
true);
467 Q3IconViewItem *current =
iconView()->currentItem();
471 Q3IconViewItem *temp = current;
472 while ((temp = temp->nextItem())) {
480 while ((temp = temp->nextItem())) {
481 iconView()->setSelected(temp, on,
true);
486 while ((temp = temp->prevItem())) {
487 iconView()->setSelected(temp, on,
true);
509 Q3IconViewItem *item =
iconView()->firstItem();
511 if (item->isSelected()) {
513 array[(int)size-1] =
id;
515 item = item->nextItem();
547 return (Q3TextEdit*)
widget();
578 if (t ==
Name && child > 0)
593 if (t !=
Value || control) {
679 return *target ? 0 : -1;
707 return (Q3ListBox*)
widget();
714 return listBox()->index(item) + 1;
732 if (!child || t !=
Name)
735 Q3ListBoxItem *item =
listBox()->item(child - 1);
754 if (!child || !(item =
listBox()->item(child - 1)))
757 if (item->isSelectable()) {
758 if (
listBox()->selectionMode() == Q3ListBox::Multi)
760 else if (
listBox()->selectionMode() == Q3ListBox::Extended)
762 else if (
listBox()->selectionMode() == Q3ListBox::Single)
764 if (item->isSelected())
769 if (item->isCurrent())
772 if (!
listBox()->itemVisible(item))
804 if (!child || (extend &&
805 listBox()->selectionMode() != Q3ListBox::Extended &&
806 listBox()->selectionMode() != Q3ListBox::Multi))
809 Q3ListBoxItem *item =
listBox()->item(child -1);
813 listBox()->setSelected(item, on);
815 int current =
listBox()->currentItem();
816 bool down = child > current;
817 for (
int i = current; i != child;) {
848 for (
uint i = 0; i <
c; ++i) {
849 if (
listBox()->isSelected(i)) {
851 array[(int)size-1] = i+1;
T qobject_cast(QObject *object)
#define QT_END_NAMESPACE
This macro expands to.
Q3AccessibleTextEdit(QWidget *o)
Constructs a Q3AccessibleTextEdit object for a widget.
int itemCount() const
Reimplemented Function
bool setSelected(int child, bool on, bool extend)
Selects the item with index child if on is true; otherwise unselects it.
QVector< int > selection() const
Returns a (possibly empty) list of indexes of the items selected in the list box. ...
#define it(className, varName)
QRect itemRect(int item) const
void setText(Text t, int child, const QString &text)
Reimplemented Function
QAccessibleListBox(QWidget *o)
Constructs a QAccessibleListBox object for a widget.
Q3IconView * iconView() const
Returns the icon view.
Role
This enum defines the role of an accessible object.
int width() const
Returns the width of the rectangle.
State state(int child) const
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int itemCount() const
Reimplemented Function
int height() const
Returns the height of the rectangle.
The QString class provides a Unicode character string.
virtual QObject * object() const =0
Returns a pointer to the QObject this interface implementation provides information for...
The QObject class is the base class of all Qt objects.
QString text(Text t, int child) const
Reimplemented Function
void clearSelection()
Sets all the items in the list box to be unselected.
void setText(Text t, int control, const QString &text)
Reimplemented Function
int itemAt(int x, int y) const
Reimplemented Function
void resize(int size)
Sets the size of the vector to size.
Q3TextEdit * textEdit() const
Returns the text edit.
Role role(int child) const
Reimplemented Function
#define QT_BEGIN_NAMESPACE
This macro expands to.
QRect itemRect(int item) const
Reimplemented Function
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
QRect itemRect(int item) const
Reimplemented Function
int itemCount() const
Reimplemented Function
Role role(int child) const
Reimplemented Function
The State element defines configurations of objects and properties.
bool setSelected(int child, bool on, bool extend)
int itemAt(int x, int y) const
Reimplemented Function
QString text(Text t, int child) const
static Q3IconViewItem * findIVItem(Q3IconView *iconView, int child)
State state(int child) const
Reimplemented Function
int itemAt(int x, int y) const
Reimplemented Function
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
QAccessibleIconView(QWidget *o)
Constructs a QAccessibleIconView object for a widget.
QVector< int > selection() const
int itemAt(int x, int y) const
Role role(int child) const
Reimplemented Function
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
int x() const
Returns the x-coordinate of the rectangle's left edge.
The QPoint class defines a point in the plane using integer precision.
Q3ListBox * listBox() const
Returns the list box.
Role role(int child) const
State state(int child) const
Reimplemented Function
The QRect class defines a rectangle in the plane using integer precision.
bool setSelected(int child, bool on, bool extend)
QString text(Text t, int child) const
Reimplemented Function
QObject * object() const
Reimplemented Function
int y() const
Returns the y coordinate of this point.
Q3ListView * listView() const
Returns the list view.
static Q3ListViewItem * findLVItem(Q3ListView *listView, int child)
int x() const
Returns the x coordinate of this point.
QVector< int > selection() const
QAccessibleListView(QWidget *o)
Constructs a QAccessibleListView object for a widget.
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
QRect itemRect(int item) const
Reimplemented Function
QString text(Text t, int child) const
Reimplemented Function
The Text item allows you to add formatted text to a scene.