From b283cf865c1a4cc886280937ea9c78271418ac3a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 29 Jan 2013 23:28:13 -0600 Subject: Rename a few build variables for overall consistency --- src/3rdparty/sqlite/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/sqlite/os.c b/src/3rdparty/sqlite/os.c index 3130bdeeb..1d91c354a 100644 --- a/src/3rdparty/sqlite/os.c +++ b/src/3rdparty/sqlite/os.c @@ -1340,7 +1340,7 @@ int sqliteOsReadLock(OsFile *id){ ovlp.Offset = FIRST_LOCKBYTE+1; ovlp.OffsetHigh = 0; ovlp.hEvent = 0; - res = LockFileEx(id->h, LOCKFILE_FAIL_IMMEDIATELY, + res = LockFileEx(id->h, LOCTDEFILE_FAIL_IMMEDIATELY, 0, N_LOCKBYTE, 0, &ovlp); }else{ res = LockFile(id->h, FIRST_LOCKBYTE+lk, 0, 1, 0); -- cgit v1.2.1 From ac037fd7970c8bc4f3a50dda06589016a1190af7 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 17:25:37 -0600 Subject: Fix FTBFS --- doc/html/checklists-example.html | 283 --------------------------------- doc/html/chectdelists-example.html | 283 +++++++++++++++++++++++++++++++++ doc/html/qchecklistitem-members.html | 120 -------------- doc/html/qchecklistitem.html | 256 ----------------------------- doc/html/qchectdelistitem-members.html | 120 ++++++++++++++ doc/html/qchectdelistitem.html | 256 +++++++++++++++++++++++++++++ doc/man/man3/qchecklistitem.3qt | 229 -------------------------- doc/man/man3/qchectdelistitem.3qt | 229 ++++++++++++++++++++++++++ examples/checklists/checklists.cpp | 162 ------------------- examples/checklists/checklists.doc | 29 ---- examples/checklists/checklists.h | 35 ---- examples/checklists/checklists.pro | 11 -- examples/checklists/main.cpp | 24 --- examples/chectdelists/chectdelists.cpp | 162 +++++++++++++++++++ examples/chectdelists/chectdelists.doc | 29 ++++ examples/chectdelists/chectdelists.h | 35 ++++ examples/chectdelists/chectdelists.pro | 11 ++ examples/chectdelists/main.cpp | 24 +++ 18 files changed, 1149 insertions(+), 1149 deletions(-) delete mode 100644 doc/html/checklists-example.html create mode 100644 doc/html/chectdelists-example.html delete mode 100644 doc/html/qchecklistitem-members.html delete mode 100644 doc/html/qchecklistitem.html create mode 100644 doc/html/qchectdelistitem-members.html create mode 100644 doc/html/qchectdelistitem.html delete mode 100644 doc/man/man3/qchecklistitem.3qt create mode 100644 doc/man/man3/qchectdelistitem.3qt delete mode 100644 examples/checklists/checklists.cpp delete mode 100644 examples/checklists/checklists.doc delete mode 100644 examples/checklists/checklists.h delete mode 100644 examples/checklists/checklists.pro delete mode 100644 examples/checklists/main.cpp create mode 100644 examples/chectdelists/chectdelists.cpp create mode 100644 examples/chectdelists/chectdelists.doc create mode 100644 examples/chectdelists/chectdelists.h create mode 100644 examples/chectdelists/chectdelists.pro create mode 100644 examples/chectdelists/main.cpp diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html deleted file mode 100644 index 54f945f02..000000000 --- a/doc/html/checklists-example.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - -Listviews with Checkable Items - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

Listviews with Checkable Items

- - -

-This example program shows how to use listviews with different types of -checkable items. -


-

Header file: -

/****************************************************************************
-** $Id: qt/checklists.h   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#ifndef CHECKLISTS_H
-#define CHECKLISTS_H
-
-#include <ntqwidget.h>
-
-class TQListView;
-class TQLabel;
-
-class CheckLists : public TQWidget
-{
-    TQ_OBJECT
-
-public:
-    CheckLists( TQWidget *parent = 0, const char *name = 0 );
-
-protected:
-    TQListView *lv1, *lv2;
-    TQLabel *label;
-
-protected slots:
-    void copy1to2();
-    void copy2to3();
-
-};
-
-#endif
-
- -


-

Implementation: -

/****************************************************************************
-** $Id: qt/checklists.cpp   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#include "checklists.h"
-
-#include <ntqlistview.h>
-#include <ntqvbox.h>
-#include <ntqlabel.h>
-#include <ntqvaluelist.h>
-#include <ntqstring.h>
-#include <ntqpushbutton.h>
-#include <ntqlayout.h>
-
-/*
- * Constructor
- *
- * Create all child widgets of the CheckList Widget
- */
-
-CheckLists::CheckLists( TQWidget *parent, const char *name )
-    : TQWidget( parent, name )
-{
-    TQHBoxLayout *lay = new TQHBoxLayout( this );
-    lay->setMargin( 5 );
-
-    // create a widget which layouts its childs in a column
-    TQVBoxLayout *vbox1 = new TQVBoxLayout( lay );
-    vbox1->setMargin( 5 );
-
-    // First child: a Label
-    vbox1->addWidget( new TQLabel( "Check some items!", this ) );
-
-    // Second child: the ListView
-    lv1 = new TQListView( this );
-    vbox1->addWidget( lv1 );
-    lv1->addColumn( "Items" );
-    lv1->setRootIsDecorated( TRUE );
-
-    // create a list with 4 ListViewItems which will be parent items of other ListViewItems
-    TQValueList<TQListViewItem *> parentList;
-
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) );
-
-    TQListViewItem *item = 0;
-    unsigned int num = 1;
-    // go through the list of parent items...
-    for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
-          ( *it )->setOpen( TRUE ), ++it, num++ ) {
-        item = *it;
-        // ...and create 5 checkable child ListViewItems for each parent item
-        for ( unsigned int i = 1; i <= 5; i++ )
-            (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox );
-    }
-
-    // Create another widget for layouting
-    TQVBoxLayout *tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // create a pushbutton
-    TQPushButton *copy1 = new TQPushButton( "  ->  ", this );
-    tmp->addWidget( copy1 );
-    copy1->setMaximumWidth( copy1->sizeHint().width() );
-    // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2()
-    connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) );
-
-    // another widget for layouting
-    TQVBoxLayout *vbox2 = new TQVBoxLayout( lay );
-    vbox2->setMargin( 5 );
-
-    // and another label
-    vbox2->addWidget( new TQLabel( "Check one item!", this ) );
-
-    // create the second listview
-    lv2 = new TQListView( this );
-    vbox2->addWidget( lv2 );
-    lv2->addColumn( "Items" );
-    lv2->setRootIsDecorated( TRUE );
-
-    // another widget needed for layouting only
-    tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // create another pushbutton...
-    TQPushButton *copy2 = new TQPushButton( "  ->  ", this );
-    lay->addWidget( copy2 );
-    copy2->setMaximumWidth( copy2->sizeHint().width() );
-    // ...and connect its clicked() SIGNAL to the copy2to3() SLOT
-    connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) );
-
-    tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // and create a label which will be at the right of the window
-    label = new TQLabel( "No Item yet...", this );
-    tmp->addWidget( label );
-}
-
-/*
- * SLOT copy1to2()
- *
- * Copies all checked ListViewItems from the first ListView to
- * the second one, and inserts them as Radio-ListViewItem.
- */
-
-void CheckLists::copy1to2()
-{
-    // create an iterator which operates on the first ListView
-    TQListViewItemIterator it( lv1 );
-
-    lv2->clear();
-
-    // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
-    // are inserted into a Listview, the parent item of these MUST be a controller Item!
-    TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller );
-    item->setOpen( TRUE );
-
-    // iterate through the first ListView...
-    for ( ; it.current(); ++it )
-        // ...check state of childs, and...
-        if ( it.current()->parent() )
-            // ...if the item is checked...
-            if ( ( (TQCheckListItem*)it.current() )->isOn() )
-                // ...insert a Radio-ListViewItem with the same text into the second ListView
-                (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton );
-
-    if ( item->firstChild() )
-        ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE );
-}
-
-/*
- * SLOT copy2to3()
- *
- * Copies the checked item of the second ListView into the
- * Label at the right.
- */
-
-void CheckLists::copy2to3()
-{
-    // create an iterator which operates on the second ListView
-    TQListViewItemIterator it( lv2 );
-
-    label->setText( "No Item checked" );
-
-    // iterate through the second ListView...
-    for ( ; it.current(); ++it )
-        // ...check state of childs, and...
-        if ( it.current()->parent() )
-            // ...if the item is checked...
-            if ( ( (TQCheckListItem*)it.current() )->isOn() )
-                // ...set the text of the item to the label
-                label->setText( it.current()->text( 0 ) );
-}
-
-
- -


-

Main: -

/****************************************************************************
-** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#include "checklists.h"
-#include <ntqapplication.h>
-
-int main( int argc, char **argv )
-{
-    TQApplication a( argc, argv );
-
-    CheckLists checklists;
-    checklists.resize( 650, 350 );
-    checklists.setCaption( "TQt Example - CheckLists" );
-    a.setMainWidget( &checklists );
-    checklists.show();
-
-    return a.exec();
-}
-
- -

See also Examples. - - -


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/html/chectdelists-example.html b/doc/html/chectdelists-example.html new file mode 100644 index 000000000..54f945f02 --- /dev/null +++ b/doc/html/chectdelists-example.html @@ -0,0 +1,283 @@ + + + + + +Listviews with Checkable Items + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Listviews with Checkable Items

+ + +

+This example program shows how to use listviews with different types of +checkable items. +


+

Header file: +

/****************************************************************************
+** $Id: qt/checklists.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#ifndef CHECKLISTS_H
+#define CHECKLISTS_H
+
+#include <ntqwidget.h>
+
+class TQListView;
+class TQLabel;
+
+class CheckLists : public TQWidget
+{
+    TQ_OBJECT
+
+public:
+    CheckLists( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQListView *lv1, *lv2;
+    TQLabel *label;
+
+protected slots:
+    void copy1to2();
+    void copy2to3();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/checklists.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include "checklists.h"
+
+#include <ntqlistview.h>
+#include <ntqvbox.h>
+#include <ntqlabel.h>
+#include <ntqvaluelist.h>
+#include <ntqstring.h>
+#include <ntqpushbutton.h>
+#include <ntqlayout.h>
+
+/*
+ * Constructor
+ *
+ * Create all child widgets of the CheckList Widget
+ */
+
+CheckLists::CheckLists( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    TQHBoxLayout *lay = new TQHBoxLayout( this );
+    lay->setMargin( 5 );
+
+    // create a widget which layouts its childs in a column
+    TQVBoxLayout *vbox1 = new TQVBoxLayout( lay );
+    vbox1->setMargin( 5 );
+
+    // First child: a Label
+    vbox1->addWidget( new TQLabel( "Check some items!", this ) );
+
+    // Second child: the ListView
+    lv1 = new TQListView( this );
+    vbox1->addWidget( lv1 );
+    lv1->addColumn( "Items" );
+    lv1->setRootIsDecorated( TRUE );
+
+    // create a list with 4 ListViewItems which will be parent items of other ListViewItems
+    TQValueList<TQListViewItem *> parentList;
+
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) );
+
+    TQListViewItem *item = 0;
+    unsigned int num = 1;
+    // go through the list of parent items...
+    for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
+          ( *it )->setOpen( TRUE ), ++it, num++ ) {
+        item = *it;
+        // ...and create 5 checkable child ListViewItems for each parent item
+        for ( unsigned int i = 1; i <= 5; i++ )
+            (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox );
+    }
+
+    // Create another widget for layouting
+    TQVBoxLayout *tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // create a pushbutton
+    TQPushButton *copy1 = new TQPushButton( "  ->  ", this );
+    tmp->addWidget( copy1 );
+    copy1->setMaximumWidth( copy1->sizeHint().width() );
+    // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2()
+    connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) );
+
+    // another widget for layouting
+    TQVBoxLayout *vbox2 = new TQVBoxLayout( lay );
+    vbox2->setMargin( 5 );
+
+    // and another label
+    vbox2->addWidget( new TQLabel( "Check one item!", this ) );
+
+    // create the second listview
+    lv2 = new TQListView( this );
+    vbox2->addWidget( lv2 );
+    lv2->addColumn( "Items" );
+    lv2->setRootIsDecorated( TRUE );
+
+    // another widget needed for layouting only
+    tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // create another pushbutton...
+    TQPushButton *copy2 = new TQPushButton( "  ->  ", this );
+    lay->addWidget( copy2 );
+    copy2->setMaximumWidth( copy2->sizeHint().width() );
+    // ...and connect its clicked() SIGNAL to the copy2to3() SLOT
+    connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) );
+
+    tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // and create a label which will be at the right of the window
+    label = new TQLabel( "No Item yet...", this );
+    tmp->addWidget( label );
+}
+
+/*
+ * SLOT copy1to2()
+ *
+ * Copies all checked ListViewItems from the first ListView to
+ * the second one, and inserts them as Radio-ListViewItem.
+ */
+
+void CheckLists::copy1to2()
+{
+    // create an iterator which operates on the first ListView
+    TQListViewItemIterator it( lv1 );
+
+    lv2->clear();
+
+    // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
+    // are inserted into a Listview, the parent item of these MUST be a controller Item!
+    TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller );
+    item->setOpen( TRUE );
+
+    // iterate through the first ListView...
+    for ( ; it.current(); ++it )
+        // ...check state of childs, and...
+        if ( it.current()->parent() )
+            // ...if the item is checked...
+            if ( ( (TQCheckListItem*)it.current() )->isOn() )
+                // ...insert a Radio-ListViewItem with the same text into the second ListView
+                (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton );
+
+    if ( item->firstChild() )
+        ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE );
+}
+
+/*
+ * SLOT copy2to3()
+ *
+ * Copies the checked item of the second ListView into the
+ * Label at the right.
+ */
+
+void CheckLists::copy2to3()
+{
+    // create an iterator which operates on the second ListView
+    TQListViewItemIterator it( lv2 );
+
+    label->setText( "No Item checked" );
+
+    // iterate through the second ListView...
+    for ( ; it.current(); ++it )
+        // ...check state of childs, and...
+        if ( it.current()->parent() )
+            // ...if the item is checked...
+            if ( ( (TQCheckListItem*)it.current() )->isOn() )
+                // ...set the text of the item to the label
+                label->setText( it.current()->text( 0 ) );
+}
+
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include "checklists.h"
+#include <ntqapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    CheckLists checklists;
+    checklists.resize( 650, 350 );
+    checklists.setCaption( "TQt Example - CheckLists" );
+    a.setMainWidget( &checklists );
+    checklists.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchecklistitem-members.html b/doc/html/qchecklistitem-members.html deleted file mode 100644 index 390cd7b0f..000000000 --- a/doc/html/qchecklistitem-members.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -TQCheckListItem Member List - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

Complete Member List for TQCheckListItem

- -

This is the complete list of member functions for -TQCheckListItem, including inherited members. - -

- -


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/html/qchecklistitem.html b/doc/html/qchecklistitem.html deleted file mode 100644 index eed2dd1c5..000000000 --- a/doc/html/qchecklistitem.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - -TQCheckListItem Class - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

TQCheckListItem Class Reference

- -

The TQCheckListItem class provides checkable list view items. -More... -

#include <ntqlistview.h> -

Inherits TQListViewItem. -

List of all member functions. -

Public Members

- -

Protected Members

- -

Detailed Description

- - -The TQCheckListItem class provides checkable list view items. -

-

TQCheckListItems are used in TQListViews to provide -TQListViewItems that are checkboxes, radio buttons or -controllers. -

Checkbox and controller check list items may be inserted at any -level in a list view. Radio button check list items must be -children of a controller check list item. -

The item can be checked or unchecked with setOn(). Its type can be -retrieved with type() and its text retrieved with text(). -

List View Items
-

See also TQListViewItem, TQListView, and Advanced Widgets. - -


Member Type Documentation

-

TQCheckListItem::ToggleState

- -

This enum specifies a TQCheckListItem's toggle state. -

-

TQCheckListItem::Type

- -

This enum type specifies a TQCheckListItem's type: -

-

Member Function Documentation

-

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that a RadioButton must be the child of a -RadioButtonController, otherwise it will not toggle. - -

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, and with text text -and of type tt. Note that a RadioButton must be the child of -a RadioButtonController, otherwise it will not toggle. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, with text text and -of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that tt must not be RadioButton. -Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, with text text and -of type tt. Note that tt must not be RadioButton. -Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p ) -

-Constructs a RadioButtonController item with parent parent, -text text and pixmap p. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p ) -

-Constructs a RadioButtonController item with parent parent, -text text and pixmap p. - -

TQCheckListItem::~TQCheckListItem () -

-Destroys the item, and all its children to any depth, freeing up -all allocated resources. - -

void TQCheckListItem::activate () [virtual protected] -

-Toggle check box or set radio button to on. - -

Reimplemented from TQListViewItem. -

bool TQCheckListItem::isOn () const -

- -

Returns TRUE if the item is toggled on; otherwise returns FALSE. - -

bool TQCheckListItem::isTristate () const -

-Returns TRUE if the item is tristate; otherwise returns FALSE. -

See also setTristate(). - -

void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] -

-Paints the item using the painter p and the color group cg. -The item is in column column, has width width and has -alignment align. (See TQt::AlignmentFlags for valid alignments.) - -

Reimplemented from TQListViewItem. -

void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] -

-Draws the focus rectangle r using the color group cg on the -painter p. - -

Reimplemented from TQListViewItem. -

int TQCheckListItem::rtti () const [virtual] -

- -

Returns 1. -

Make your derived classes return their own values for rtti(), and -you can distinguish between list view items. You should use values -greater than 1000, to allow for extensions to this class. - -

Reimplemented from TQListViewItem. -

void TQCheckListItem::setOn ( bool b ) [virtual] -

-Sets the button on if b is TRUE, otherwise sets it off. -Maintains radio button exclusivity. - -

void TQCheckListItem::setState ( ToggleState s ) -

-Sets the toggle state of the checklistitem to s. s can be -Off, NoChange or On. -

Tristate can only be enabled for CheckBox or CheckBoxController, -therefore the NoChange only applies to them. -

Setting the state to On or Off on a CheckBoxController -will recursivly set the states of its children to the same state. -

Setting the state to NoChange on a CheckBoxController will -make it recursivly recall the previous stored state of its -children. If there was no previous stored state the children are -all set to On. - -

void TQCheckListItem::setTristate ( bool b ) -

-Sets tristate to b if the Type is either a CheckBoxController or -a CheckBox. -

CheckBoxControllers are tristate by default. -

See also state() and isTristate(). - -

ToggleState TQCheckListItem::state () const -

-Returns the state of the item. -

See also TQCheckListItem::ToggleState. - -

void TQCheckListItem::stateChange ( bool ) [virtual protected] -

-This virtual function is called when the item changes its state. -NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so -use state() to determine if the state is actually Off or NoChange. - -

TQString TQCheckListItem::text () const -

- -

Returns the item's text. - -

void TQCheckListItem::turnOffChild () [protected] -

-If this is a RadioButtonController that has RadioButton -children, turn off the child that is on. - -

Type TQCheckListItem::type () const -

- -

Returns the type of this item. - - -


-This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/html/qchectdelistitem-members.html b/doc/html/qchectdelistitem-members.html new file mode 100644 index 000000000..390cd7b0f --- /dev/null +++ b/doc/html/qchectdelistitem-members.html @@ -0,0 +1,120 @@ + + + + + +TQCheckListItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCheckListItem

+ +

This is the complete list of member functions for +TQCheckListItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchectdelistitem.html b/doc/html/qchectdelistitem.html new file mode 100644 index 000000000..eed2dd1c5 --- /dev/null +++ b/doc/html/qchectdelistitem.html @@ -0,0 +1,256 @@ + + + + + +TQCheckListItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCheckListItem Class Reference

+ +

The TQCheckListItem class provides checkable list view items. +More... +

#include <ntqlistview.h> +

Inherits TQListViewItem. +

List of all member functions. +

Public Members

+ +

Protected Members

+ +

Detailed Description

+ + +The TQCheckListItem class provides checkable list view items. +

+

TQCheckListItems are used in TQListViews to provide +TQListViewItems that are checkboxes, radio buttons or +controllers. +

Checkbox and controller check list items may be inserted at any +level in a list view. Radio button check list items must be +children of a controller check list item. +

The item can be checked or unchecked with setOn(). Its type can be +retrieved with type() and its text retrieved with text(). +

List View Items
+

See also TQListViewItem, TQListView, and Advanced Widgets. + +


Member Type Documentation

+

TQCheckListItem::ToggleState

+ +

This enum specifies a TQCheckListItem's toggle state. +

+

TQCheckListItem::Type

+ +

This enum type specifies a TQCheckListItem's type: +

+

Member Function Documentation

+

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that a RadioButton must be the child of a +RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, and with text text +and of type tt. Note that a RadioButton must be the child of +a RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::~TQCheckListItem () +

+Destroys the item, and all its children to any depth, freeing up +all allocated resources. + +

void TQCheckListItem::activate () [virtual protected] +

+Toggle check box or set radio button to on. + +

Reimplemented from TQListViewItem. +

bool TQCheckListItem::isOn () const +

+ +

Returns TRUE if the item is toggled on; otherwise returns FALSE. + +

bool TQCheckListItem::isTristate () const +

+Returns TRUE if the item is tristate; otherwise returns FALSE. +

See also setTristate(). + +

void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] +

+Paints the item using the painter p and the color group cg. +The item is in column column, has width width and has +alignment align. (See TQt::AlignmentFlags for valid alignments.) + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] +

+Draws the focus rectangle r using the color group cg on the +painter p. + +

Reimplemented from TQListViewItem. +

int TQCheckListItem::rtti () const [virtual] +

+ +

Returns 1. +

Make your derived classes return their own values for rtti(), and +you can distinguish between list view items. You should use values +greater than 1000, to allow for extensions to this class. + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::setOn ( bool b ) [virtual] +

+Sets the button on if b is TRUE, otherwise sets it off. +Maintains radio button exclusivity. + +

void TQCheckListItem::setState ( ToggleState s ) +

+Sets the toggle state of the checklistitem to s. s can be +Off, NoChange or On. +

Tristate can only be enabled for CheckBox or CheckBoxController, +therefore the NoChange only applies to them. +

Setting the state to On or Off on a CheckBoxController +will recursivly set the states of its children to the same state. +

Setting the state to NoChange on a CheckBoxController will +make it recursivly recall the previous stored state of its +children. If there was no previous stored state the children are +all set to On. + +

void TQCheckListItem::setTristate ( bool b ) +

+Sets tristate to b if the Type is either a CheckBoxController or +a CheckBox. +

CheckBoxControllers are tristate by default. +

See also state() and isTristate(). + +

ToggleState TQCheckListItem::state () const +

+Returns the state of the item. +

See also TQCheckListItem::ToggleState. + +

void TQCheckListItem::stateChange ( bool ) [virtual protected] +

+This virtual function is called when the item changes its state. +NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so +use state() to determine if the state is actually Off or NoChange. + +

TQString TQCheckListItem::text () const +

+ +

Returns the item's text. + +

void TQCheckListItem::turnOffChild () [protected] +

+If this is a RadioButtonController that has RadioButton +children, turn off the child that is on. + +

Type TQCheckListItem::type () const +

+ +

Returns the type of this item. + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/man/man3/qchecklistitem.3qt b/doc/man/man3/qchecklistitem.3qt deleted file mode 100644 index 1b156e9d0..000000000 --- a/doc/man/man3/qchecklistitem.3qt +++ /dev/null @@ -1,229 +0,0 @@ -'\" t -.TH QCheckListItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- -.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the -.\" license file included in the distribution for a complete license -.\" statement. -.\" -.ad l -.nh -.SH NAME -QCheckListItem \- Checkable list view items -.SH SYNOPSIS -\fC#include \fR -.PP -Inherits QListViewItem. -.PP -.SS "Public Members" -.in +1c -.ti -1c -.BI "enum \fBType\fR { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }" -.br -.ti -1c -.BI "enum \fBToggleState\fR { Off, NoChange, On }" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, const QPixmap & p )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, const QPixmap & p )" -.br -.ti -1c -.BI "\fB~QCheckListItem\fR ()" -.br -.ti -1c -.BI "virtual void \fBpaintCell\fR ( QPainter * p, const QColorGroup & cg, int column, int width, int align )" -.br -.ti -1c -.BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg, const QRect & r )" -.br -.ti -1c -.BI "virtual void \fBsetOn\fR ( bool b )" -.br -.ti -1c -.BI "bool \fBisOn\fR () const" -.br -.ti -1c -.BI "Type \fBtype\fR () const" -.br -.ti -1c -.BI "QString \fBtext\fR () const" -.br -.ti -1c -.BI "void \fBsetTristate\fR ( bool b )" -.br -.ti -1c -.BI "bool \fBisTristate\fR () const" -.br -.ti -1c -.BI "ToggleState \fBstate\fR () const" -.br -.ti -1c -.BI "void \fBsetState\fR ( ToggleState s )" -.br -.ti -1c -.BI "virtual int \fBrtti\fR () const" -.br -.in -1c -.SS "Protected Members" -.in +1c -.ti -1c -.BI "virtual void \fBactivate\fR ()" -.br -.ti -1c -.BI "void \fBturnOffChild\fR ()" -.br -.ti -1c -.BI "virtual void \fBstateChange\fR ( bool )" -.br -.in -1c -.SH DESCRIPTION -The QCheckListItem class provides checkable list view items. -.PP -QCheckListItems are used in QListViews to provide QListViewItems that are checkboxes, radio buttons or controllers. -.PP -Checkbox and controller check list items may be inserted at any level in a list view. Radio button check list items must be children of a controller check list item. -.PP -The item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text(). -.PP -
-.ce 1 -.B "[Image Omitted]" -.PP -
-.PP -See also QListViewItem, QListView, and Advanced Widgets. -.SS "Member Type Documentation" -.SH "QCheckListItem::ToggleState" -This enum specifies a QCheckListItem's toggle state. -.TP -\fCQCheckListItem::Off\fR -.TP -\fCQCheckListItem::NoChange\fR -.TP -\fCQCheckListItem::On\fR -.SH "QCheckListItem::Type" -This enum type specifies a QCheckListItem's type: -.TP -\fCQCheckListItem::RadioButton\fR -.TP -\fCQCheckListItem::CheckBox\fR -.TP -\fCQCheckListItem::Controller\fR - \fIobsolete\fR (use RadioButtonController instead) -.TP -\fCQCheckListItem::RadioButtonController\fR -.TP -\fCQCheckListItem::CheckBoxController\fR -.SH MEMBER FUNCTION DOCUMENTATION -.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. -.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, and with text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )" -Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )" -Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. -.SH "QCheckListItem::~QCheckListItem ()" -Destroys the item, and all its children to any depth, freeing up all allocated resources. -.SH "void QCheckListItem::activate ()\fC [virtual protected]\fR" -Toggle check box or set radio button to on. -.PP -Reimplemented from QListViewItem. -.SH "bool QCheckListItem::isOn () const" -Returns TRUE if the item is toggled on; otherwise returns FALSE. -.SH "bool QCheckListItem::isTristate () const" -Returns TRUE if the item is tristate; otherwise returns FALSE. -.PP -See also setTristate(). -.SH "void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )\fC [virtual]\fR" -Paints the item using the painter \fIp\fR and the color group \fIcg\fR. The item is in column \fIcolumn\fR, has width \fIwidth\fR and has alignment \fIalign\fR. (See Qt::AlignmentFlags for valid alignments.) -.PP -Reimplemented from QListViewItem. -.SH "void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r )\fC [virtual]\fR" -Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR. -.PP -Reimplemented from QListViewItem. -.SH "int QCheckListItem::rtti () const\fC [virtual]\fR" -Returns 1. -.PP -Make your derived classes return their own values for rtti(), and you can distinguish between list view items. You should use values greater than 1000, to allow for extensions to this class. -.PP -Reimplemented from QListViewItem. -.SH "void QCheckListItem::setOn ( bool b )\fC [virtual]\fR" -Sets the button on if \fIb\fR is TRUE, otherwise sets it off. Maintains radio button exclusivity. -.SH "void QCheckListItem::setState ( ToggleState s )" -Sets the toggle state of the checklistitem to \fIs\fR. \fIs\fR can be Off, NoChange or On. -.PP -Tristate can only be enabled for CheckBox or CheckBoxController, therefore the NoChange only applies to them. -.PP -Setting the state to On or Off on a CheckBoxController will recursivly set the states of its children to the same state. -.PP -Setting the state to NoChange on a CheckBoxController will make it recursivly recall the previous stored state of its children. If there was no previous stored state the children are all set to On. -.SH "void QCheckListItem::setTristate ( bool b )" -Sets tristate to \fIb\fR if the Type is either a CheckBoxController or a CheckBox. -.PP -\fCCheckBoxControllers\fR are tristate by default. -.PP -See also state() and isTristate(). -.SH "ToggleState QCheckListItem::state () const" -Returns the state of the item. -.PP -See also QCheckListItem::ToggleState. -.SH "void QCheckListItem::stateChange ( bool )\fC [virtual protected]\fR" -This virtual function is called when the item changes its state. NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so use state() to determine if the state is actually Off or NoChange. -.SH "QString QCheckListItem::text () const" -Returns the item's text. -.SH "void QCheckListItem::turnOffChild ()\fC [protected]\fR" -If this is a RadioButtonController that has RadioButton children, turn off the child that is on. -.SH "Type QCheckListItem::type () const" -Returns the type of this item. - -.SH "SEE ALSO" -.BR http://doc.trolltech.com/qchecklistitem.html -.BR http://www.trolltech.com/faq/tech.html -.SH COPYRIGHT -Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the -license file included in the distribution for a complete license -statement. -.SH AUTHOR -Generated automatically from the source code. -.SH BUGS -If you find a bug in Qt, please report it as described in -.BR http://doc.trolltech.com/bughowto.html . -Good bug reports help us to help you. Thank you. -.P -The definitive Qt documentation is provided in HTML format; it is -located at $QTDIR/doc/html and can be read using Qt Assistant or with -a web browser. This man page is provided as a convenience for those -users who prefer man pages, although this format is not officially -supported by Trolltech. -.P -If you find errors in this manual page, please report them to -.BR qt-bugs@trolltech.com . -Please include the name of the manual page (qchecklistitem.3qt) and the Qt -version (3.3.8). diff --git a/doc/man/man3/qchectdelistitem.3qt b/doc/man/man3/qchectdelistitem.3qt new file mode 100644 index 000000000..1b156e9d0 --- /dev/null +++ b/doc/man/man3/qchectdelistitem.3qt @@ -0,0 +1,229 @@ +'\" t +.TH QCheckListItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QCheckListItem \- Checkable list view items +.SH SYNOPSIS +\fC#include \fR +.PP +Inherits QListViewItem. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "enum \fBType\fR { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }" +.br +.ti -1c +.BI "enum \fBToggleState\fR { Off, NoChange, On }" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, const QPixmap & p )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, const QPixmap & p )" +.br +.ti -1c +.BI "\fB~QCheckListItem\fR ()" +.br +.ti -1c +.BI "virtual void \fBpaintCell\fR ( QPainter * p, const QColorGroup & cg, int column, int width, int align )" +.br +.ti -1c +.BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg, const QRect & r )" +.br +.ti -1c +.BI "virtual void \fBsetOn\fR ( bool b )" +.br +.ti -1c +.BI "bool \fBisOn\fR () const" +.br +.ti -1c +.BI "Type \fBtype\fR () const" +.br +.ti -1c +.BI "QString \fBtext\fR () const" +.br +.ti -1c +.BI "void \fBsetTristate\fR ( bool b )" +.br +.ti -1c +.BI "bool \fBisTristate\fR () const" +.br +.ti -1c +.BI "ToggleState \fBstate\fR () const" +.br +.ti -1c +.BI "void \fBsetState\fR ( ToggleState s )" +.br +.ti -1c +.BI "virtual int \fBrtti\fR () const" +.br +.in -1c +.SS "Protected Members" +.in +1c +.ti -1c +.BI "virtual void \fBactivate\fR ()" +.br +.ti -1c +.BI "void \fBturnOffChild\fR ()" +.br +.ti -1c +.BI "virtual void \fBstateChange\fR ( bool )" +.br +.in -1c +.SH DESCRIPTION +The QCheckListItem class provides checkable list view items. +.PP +QCheckListItems are used in QListViews to provide QListViewItems that are checkboxes, radio buttons or controllers. +.PP +Checkbox and controller check list items may be inserted at any level in a list view. Radio button check list items must be children of a controller check list item. +.PP +The item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text(). +.PP +
+.ce 1 +.B "[Image Omitted]" +.PP +
+.PP +See also QListViewItem, QListView, and Advanced Widgets. +.SS "Member Type Documentation" +.SH "QCheckListItem::ToggleState" +This enum specifies a QCheckListItem's toggle state. +.TP +\fCQCheckListItem::Off\fR +.TP +\fCQCheckListItem::NoChange\fR +.TP +\fCQCheckListItem::On\fR +.SH "QCheckListItem::Type" +This enum type specifies a QCheckListItem's type: +.TP +\fCQCheckListItem::RadioButton\fR +.TP +\fCQCheckListItem::CheckBox\fR +.TP +\fCQCheckListItem::Controller\fR - \fIobsolete\fR (use RadioButtonController instead) +.TP +\fCQCheckListItem::RadioButtonController\fR +.TP +\fCQCheckListItem::CheckBoxController\fR +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. +.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, and with text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )" +Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )" +Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. +.SH "QCheckListItem::~QCheckListItem ()" +Destroys the item, and all its children to any depth, freeing up all allocated resources. +.SH "void QCheckListItem::activate ()\fC [virtual protected]\fR" +Toggle check box or set radio button to on. +.PP +Reimplemented from QListViewItem. +.SH "bool QCheckListItem::isOn () const" +Returns TRUE if the item is toggled on; otherwise returns FALSE. +.SH "bool QCheckListItem::isTristate () const" +Returns TRUE if the item is tristate; otherwise returns FALSE. +.PP +See also setTristate(). +.SH "void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )\fC [virtual]\fR" +Paints the item using the painter \fIp\fR and the color group \fIcg\fR. The item is in column \fIcolumn\fR, has width \fIwidth\fR and has alignment \fIalign\fR. (See Qt::AlignmentFlags for valid alignments.) +.PP +Reimplemented from QListViewItem. +.SH "void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r )\fC [virtual]\fR" +Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR. +.PP +Reimplemented from QListViewItem. +.SH "int QCheckListItem::rtti () const\fC [virtual]\fR" +Returns 1. +.PP +Make your derived classes return their own values for rtti(), and you can distinguish between list view items. You should use values greater than 1000, to allow for extensions to this class. +.PP +Reimplemented from QListViewItem. +.SH "void QCheckListItem::setOn ( bool b )\fC [virtual]\fR" +Sets the button on if \fIb\fR is TRUE, otherwise sets it off. Maintains radio button exclusivity. +.SH "void QCheckListItem::setState ( ToggleState s )" +Sets the toggle state of the checklistitem to \fIs\fR. \fIs\fR can be Off, NoChange or On. +.PP +Tristate can only be enabled for CheckBox or CheckBoxController, therefore the NoChange only applies to them. +.PP +Setting the state to On or Off on a CheckBoxController will recursivly set the states of its children to the same state. +.PP +Setting the state to NoChange on a CheckBoxController will make it recursivly recall the previous stored state of its children. If there was no previous stored state the children are all set to On. +.SH "void QCheckListItem::setTristate ( bool b )" +Sets tristate to \fIb\fR if the Type is either a CheckBoxController or a CheckBox. +.PP +\fCCheckBoxControllers\fR are tristate by default. +.PP +See also state() and isTristate(). +.SH "ToggleState QCheckListItem::state () const" +Returns the state of the item. +.PP +See also QCheckListItem::ToggleState. +.SH "void QCheckListItem::stateChange ( bool )\fC [virtual protected]\fR" +This virtual function is called when the item changes its state. NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so use state() to determine if the state is actually Off or NoChange. +.SH "QString QCheckListItem::text () const" +Returns the item's text. +.SH "void QCheckListItem::turnOffChild ()\fC [protected]\fR" +If this is a RadioButtonController that has RadioButton children, turn off the child that is on. +.SH "Type QCheckListItem::type () const" +Returns the type of this item. + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qchecklistitem.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +The definitive Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt Assistant or with +a web browser. This man page is provided as a convenience for those +users who prefer man pages, although this format is not officially +supported by Trolltech. +.P +If you find errors in this manual page, please report them to +.BR qt-bugs@trolltech.com . +Please include the name of the manual page (qchecklistitem.3qt) and the Qt +version (3.3.8). diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp deleted file mode 100644 index 08b11fc30..000000000 --- a/examples/checklists/checklists.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include "checklists.h" - -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructor - * - * Create all child widgets of the CheckList Widget - */ - -CheckLists::CheckLists( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) -{ - TQHBoxLayout *lay = new TQHBoxLayout( this ); - lay->setMargin( 5 ); - - // create a widget which layouts its childs in a column - TQVBoxLayout *vbox1 = new TQVBoxLayout( lay ); - vbox1->setMargin( 5 ); - - // First child: a Label - vbox1->addWidget( new TQLabel( "Check some items!", this ) ); - - // Second child: the ListView - lv1 = new TQListView( this ); - vbox1->addWidget( lv1 ); - lv1->addColumn( "Items" ); - lv1->setRootIsDecorated( TRUE ); - - // create a list with 4 ListViewItems which will be parent items of other ListViewItems - TQValueList parentList; - - parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); - - TQListViewItem *item = 0; - unsigned int num = 1; - // go through the list of parent items... - for ( TQValueList::Iterator it = parentList.begin(); it != parentList.end(); - ( *it )->setOpen( TRUE ), ++it, num++ ) { - item = *it; - // ...and create 5 checkable child ListViewItems for each parent item - for ( unsigned int i = 1; i <= 5; i++ ) - (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox ); - } - - // Create another widget for layouting - TQVBoxLayout *tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // create a pushbutton - TQPushButton *copy1 = new TQPushButton( " -> ", this ); - tmp->addWidget( copy1 ); - copy1->setMaximumWidth( copy1->sizeHint().width() ); - // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() - connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); - - // another widget for layouting - TQVBoxLayout *vbox2 = new TQVBoxLayout( lay ); - vbox2->setMargin( 5 ); - - // and another label - vbox2->addWidget( new TQLabel( "Check one item!", this ) ); - - // create the second listview - lv2 = new TQListView( this ); - vbox2->addWidget( lv2 ); - lv2->addColumn( "Items" ); - lv2->setRootIsDecorated( TRUE ); - - // another widget needed for layouting only - tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // create another pushbutton... - TQPushButton *copy2 = new TQPushButton( " -> ", this ); - lay->addWidget( copy2 ); - copy2->setMaximumWidth( copy2->sizeHint().width() ); - // ...and connect its clicked() SIGNAL to the copy2to3() SLOT - connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); - - tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // and create a label which will be at the right of the window - label = new TQLabel( "No Item yet...", this ); - tmp->addWidget( label ); -} - -/* - * SLOT copy1to2() - * - * Copies all checked ListViewItems from the first ListView to - * the second one, and inserts them as Radio-ListViewItem. - */ - -void CheckLists::copy1to2() -{ - // create an iterator which operates on the first ListView - TQListViewItemIterator it( lv1 ); - - lv2->clear(); - - // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems - // are inserted into a Listview, the parent item of these MUST be a controller Item! - TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller ); - item->setOpen( TRUE ); - - // iterate through the first ListView... - for ( ; it.current(); ++it ) - // ...check state of childs, and... - if ( it.current()->parent() ) - // ...if the item is checked... - if ( ( (TQCheckListItem*)it.current() )->isOn() ) - // ...insert a Radio-ListViewItem with the same text into the second ListView - (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton ); - - if ( item->firstChild() ) - ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE ); -} - -/* - * SLOT copy2to3() - * - * Copies the checked item of the second ListView into the - * Label at the right. - */ - -void CheckLists::copy2to3() -{ - // create an iterator which operates on the second ListView - TQListViewItemIterator it( lv2 ); - - label->setText( "No Item checked" ); - - // iterate through the second ListView... - for ( ; it.current(); ++it ) - // ...check state of childs, and... - if ( it.current()->parent() ) - // ...if the item is checked... - if ( ( (TQCheckListItem*)it.current() )->isOn() ) - // ...set the text of the item to the label - label->setText( it.current()->text( 0 ) ); -} - diff --git a/examples/checklists/checklists.doc b/examples/checklists/checklists.doc deleted file mode 100644 index 417afe6b7..000000000 --- a/examples/checklists/checklists.doc +++ /dev/null @@ -1,29 +0,0 @@ -/* -*/ -/*! \page checklists-example.html - - \ingroup examples - \title Listviews with Checkable Items - - This example program shows how to use listviews with different types of - checkable items. - -
- - Header file: - - \include checklists/checklists.h - -
- - Implementation: - - \include checklists/checklists.cpp - -
- - Main: - - \include checklists/main.cpp -*/ - diff --git a/examples/checklists/checklists.h b/examples/checklists/checklists.h deleted file mode 100644 index d2097dd18..000000000 --- a/examples/checklists/checklists.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#ifndef CHECKLISTS_H -#define CHECKLISTS_H - -#include - -class TQListView; -class TQLabel; - -class CheckLists : public TQWidget -{ - TQ_OBJECT - -public: - CheckLists( TQWidget *parent = 0, const char *name = 0 ); - -protected: - TQListView *lv1, *lv2; - TQLabel *label; - -protected slots: - void copy1to2(); - void copy2to3(); - -}; - -#endif diff --git a/examples/checklists/checklists.pro b/examples/checklists/checklists.pro deleted file mode 100644 index a1a6f12d8..000000000 --- a/examples/checklists/checklists.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = checklists - -CONFIG += qt warn_on release -DEPENDPATH = ../../include - -REQUIRES = large-config - -HEADERS = checklists.h -SOURCES = checklists.cpp \ - main.cpp diff --git a/examples/checklists/main.cpp b/examples/checklists/main.cpp deleted file mode 100644 index 65f368348..000000000 --- a/examples/checklists/main.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include "checklists.h" -#include - -int main( int argc, char **argv ) -{ - TQApplication a( argc, argv ); - - CheckLists checklists; - checklists.resize( 650, 350 ); - checklists.setCaption( "TQt Example - CheckLists" ); - a.setMainWidget( &checklists ); - checklists.show(); - - return a.exec(); -} diff --git a/examples/chectdelists/chectdelists.cpp b/examples/chectdelists/chectdelists.cpp new file mode 100644 index 000000000..08b11fc30 --- /dev/null +++ b/examples/chectdelists/chectdelists.cpp @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include "checklists.h" + +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructor + * + * Create all child widgets of the CheckList Widget + */ + +CheckLists::CheckLists( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) +{ + TQHBoxLayout *lay = new TQHBoxLayout( this ); + lay->setMargin( 5 ); + + // create a widget which layouts its childs in a column + TQVBoxLayout *vbox1 = new TQVBoxLayout( lay ); + vbox1->setMargin( 5 ); + + // First child: a Label + vbox1->addWidget( new TQLabel( "Check some items!", this ) ); + + // Second child: the ListView + lv1 = new TQListView( this ); + vbox1->addWidget( lv1 ); + lv1->addColumn( "Items" ); + lv1->setRootIsDecorated( TRUE ); + + // create a list with 4 ListViewItems which will be parent items of other ListViewItems + TQValueList parentList; + + parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); + + TQListViewItem *item = 0; + unsigned int num = 1; + // go through the list of parent items... + for ( TQValueList::Iterator it = parentList.begin(); it != parentList.end(); + ( *it )->setOpen( TRUE ), ++it, num++ ) { + item = *it; + // ...and create 5 checkable child ListViewItems for each parent item + for ( unsigned int i = 1; i <= 5; i++ ) + (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox ); + } + + // Create another widget for layouting + TQVBoxLayout *tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // create a pushbutton + TQPushButton *copy1 = new TQPushButton( " -> ", this ); + tmp->addWidget( copy1 ); + copy1->setMaximumWidth( copy1->sizeHint().width() ); + // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() + connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); + + // another widget for layouting + TQVBoxLayout *vbox2 = new TQVBoxLayout( lay ); + vbox2->setMargin( 5 ); + + // and another label + vbox2->addWidget( new TQLabel( "Check one item!", this ) ); + + // create the second listview + lv2 = new TQListView( this ); + vbox2->addWidget( lv2 ); + lv2->addColumn( "Items" ); + lv2->setRootIsDecorated( TRUE ); + + // another widget needed for layouting only + tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // create another pushbutton... + TQPushButton *copy2 = new TQPushButton( " -> ", this ); + lay->addWidget( copy2 ); + copy2->setMaximumWidth( copy2->sizeHint().width() ); + // ...and connect its clicked() SIGNAL to the copy2to3() SLOT + connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); + + tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // and create a label which will be at the right of the window + label = new TQLabel( "No Item yet...", this ); + tmp->addWidget( label ); +} + +/* + * SLOT copy1to2() + * + * Copies all checked ListViewItems from the first ListView to + * the second one, and inserts them as Radio-ListViewItem. + */ + +void CheckLists::copy1to2() +{ + // create an iterator which operates on the first ListView + TQListViewItemIterator it( lv1 ); + + lv2->clear(); + + // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems + // are inserted into a Listview, the parent item of these MUST be a controller Item! + TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller ); + item->setOpen( TRUE ); + + // iterate through the first ListView... + for ( ; it.current(); ++it ) + // ...check state of childs, and... + if ( it.current()->parent() ) + // ...if the item is checked... + if ( ( (TQCheckListItem*)it.current() )->isOn() ) + // ...insert a Radio-ListViewItem with the same text into the second ListView + (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton ); + + if ( item->firstChild() ) + ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE ); +} + +/* + * SLOT copy2to3() + * + * Copies the checked item of the second ListView into the + * Label at the right. + */ + +void CheckLists::copy2to3() +{ + // create an iterator which operates on the second ListView + TQListViewItemIterator it( lv2 ); + + label->setText( "No Item checked" ); + + // iterate through the second ListView... + for ( ; it.current(); ++it ) + // ...check state of childs, and... + if ( it.current()->parent() ) + // ...if the item is checked... + if ( ( (TQCheckListItem*)it.current() )->isOn() ) + // ...set the text of the item to the label + label->setText( it.current()->text( 0 ) ); +} + diff --git a/examples/chectdelists/chectdelists.doc b/examples/chectdelists/chectdelists.doc new file mode 100644 index 000000000..417afe6b7 --- /dev/null +++ b/examples/chectdelists/chectdelists.doc @@ -0,0 +1,29 @@ +/* +*/ +/*! \page checklists-example.html + + \ingroup examples + \title Listviews with Checkable Items + + This example program shows how to use listviews with different types of + checkable items. + +
+ + Header file: + + \include checklists/checklists.h + +
+ + Implementation: + + \include checklists/checklists.cpp + +
+ + Main: + + \include checklists/main.cpp +*/ + diff --git a/examples/chectdelists/chectdelists.h b/examples/chectdelists/chectdelists.h new file mode 100644 index 000000000..d2097dd18 --- /dev/null +++ b/examples/chectdelists/chectdelists.h @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#ifndef CHECKLISTS_H +#define CHECKLISTS_H + +#include + +class TQListView; +class TQLabel; + +class CheckLists : public TQWidget +{ + TQ_OBJECT + +public: + CheckLists( TQWidget *parent = 0, const char *name = 0 ); + +protected: + TQListView *lv1, *lv2; + TQLabel *label; + +protected slots: + void copy1to2(); + void copy2to3(); + +}; + +#endif diff --git a/examples/chectdelists/chectdelists.pro b/examples/chectdelists/chectdelists.pro new file mode 100644 index 000000000..a1a6f12d8 --- /dev/null +++ b/examples/chectdelists/chectdelists.pro @@ -0,0 +1,11 @@ +TEMPLATE = app +TARGET = checklists + +CONFIG += qt warn_on release +DEPENDPATH = ../../include + +REQUIRES = large-config + +HEADERS = checklists.h +SOURCES = checklists.cpp \ + main.cpp diff --git a/examples/chectdelists/main.cpp b/examples/chectdelists/main.cpp new file mode 100644 index 000000000..65f368348 --- /dev/null +++ b/examples/chectdelists/main.cpp @@ -0,0 +1,24 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include "checklists.h" +#include + +int main( int argc, char **argv ) +{ + TQApplication a( argc, argv ); + + CheckLists checklists; + checklists.resize( 650, 350 ); + checklists.setCaption( "TQt Example - CheckLists" ); + a.setMainWidget( &checklists ); + checklists.show(); + + return a.exec(); +} -- cgit v1.2.1 From a159579b03afcfca0b7193a0d934c79a47d62656 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 17:32:43 -0600 Subject: Fix prior commit --- doc/html/checklists-example.html | 283 +++++++++++++++++++++++++++++++++ doc/html/chectdelists-example.html | 283 --------------------------------- doc/html/qchecklistitem-members.html | 120 ++++++++++++++ doc/html/qchecklistitem.html | 256 +++++++++++++++++++++++++++++ doc/html/qchectdelistitem-members.html | 120 -------------- doc/html/qchectdelistitem.html | 256 ----------------------------- doc/man/man3/qchecklistitem.3qt | 229 ++++++++++++++++++++++++++ doc/man/man3/qchectdelistitem.3qt | 229 -------------------------- examples/checklists/checklists.cpp | 162 +++++++++++++++++++ examples/checklists/checklists.doc | 29 ++++ examples/checklists/checklists.h | 35 ++++ examples/checklists/checklists.pro | 11 ++ examples/checklists/main.cpp | 24 +++ examples/chectdelists/chectdelists.cpp | 162 ------------------- examples/chectdelists/chectdelists.doc | 29 ---- examples/chectdelists/chectdelists.h | 35 ---- examples/chectdelists/chectdelists.pro | 11 -- examples/chectdelists/main.cpp | 24 --- 18 files changed, 1149 insertions(+), 1149 deletions(-) create mode 100644 doc/html/checklists-example.html delete mode 100644 doc/html/chectdelists-example.html create mode 100644 doc/html/qchecklistitem-members.html create mode 100644 doc/html/qchecklistitem.html delete mode 100644 doc/html/qchectdelistitem-members.html delete mode 100644 doc/html/qchectdelistitem.html create mode 100644 doc/man/man3/qchecklistitem.3qt delete mode 100644 doc/man/man3/qchectdelistitem.3qt create mode 100644 examples/checklists/checklists.cpp create mode 100644 examples/checklists/checklists.doc create mode 100644 examples/checklists/checklists.h create mode 100644 examples/checklists/checklists.pro create mode 100644 examples/checklists/main.cpp delete mode 100644 examples/chectdelists/chectdelists.cpp delete mode 100644 examples/chectdelists/chectdelists.doc delete mode 100644 examples/chectdelists/chectdelists.h delete mode 100644 examples/chectdelists/chectdelists.pro delete mode 100644 examples/chectdelists/main.cpp diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html new file mode 100644 index 000000000..54f945f02 --- /dev/null +++ b/doc/html/checklists-example.html @@ -0,0 +1,283 @@ + + + + + +Listviews with Checkable Items + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Listviews with Checkable Items

+ + +

+This example program shows how to use listviews with different types of +checkable items. +


+

Header file: +

/****************************************************************************
+** $Id: qt/checklists.h   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#ifndef CHECKLISTS_H
+#define CHECKLISTS_H
+
+#include <ntqwidget.h>
+
+class TQListView;
+class TQLabel;
+
+class CheckLists : public TQWidget
+{
+    TQ_OBJECT
+
+public:
+    CheckLists( TQWidget *parent = 0, const char *name = 0 );
+
+protected:
+    TQListView *lv1, *lv2;
+    TQLabel *label;
+
+protected slots:
+    void copy1to2();
+    void copy2to3();
+
+};
+
+#endif
+
+ +


+

Implementation: +

/****************************************************************************
+** $Id: qt/checklists.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include "checklists.h"
+
+#include <ntqlistview.h>
+#include <ntqvbox.h>
+#include <ntqlabel.h>
+#include <ntqvaluelist.h>
+#include <ntqstring.h>
+#include <ntqpushbutton.h>
+#include <ntqlayout.h>
+
+/*
+ * Constructor
+ *
+ * Create all child widgets of the CheckList Widget
+ */
+
+CheckLists::CheckLists( TQWidget *parent, const char *name )
+    : TQWidget( parent, name )
+{
+    TQHBoxLayout *lay = new TQHBoxLayout( this );
+    lay->setMargin( 5 );
+
+    // create a widget which layouts its childs in a column
+    TQVBoxLayout *vbox1 = new TQVBoxLayout( lay );
+    vbox1->setMargin( 5 );
+
+    // First child: a Label
+    vbox1->addWidget( new TQLabel( "Check some items!", this ) );
+
+    // Second child: the ListView
+    lv1 = new TQListView( this );
+    vbox1->addWidget( lv1 );
+    lv1->addColumn( "Items" );
+    lv1->setRootIsDecorated( TRUE );
+
+    // create a list with 4 ListViewItems which will be parent items of other ListViewItems
+    TQValueList<TQListViewItem *> parentList;
+
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) );
+    parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) );
+
+    TQListViewItem *item = 0;
+    unsigned int num = 1;
+    // go through the list of parent items...
+    for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
+          ( *it )->setOpen( TRUE ), ++it, num++ ) {
+        item = *it;
+        // ...and create 5 checkable child ListViewItems for each parent item
+        for ( unsigned int i = 1; i <= 5; i++ )
+            (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox );
+    }
+
+    // Create another widget for layouting
+    TQVBoxLayout *tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // create a pushbutton
+    TQPushButton *copy1 = new TQPushButton( "  ->  ", this );
+    tmp->addWidget( copy1 );
+    copy1->setMaximumWidth( copy1->sizeHint().width() );
+    // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2()
+    connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) );
+
+    // another widget for layouting
+    TQVBoxLayout *vbox2 = new TQVBoxLayout( lay );
+    vbox2->setMargin( 5 );
+
+    // and another label
+    vbox2->addWidget( new TQLabel( "Check one item!", this ) );
+
+    // create the second listview
+    lv2 = new TQListView( this );
+    vbox2->addWidget( lv2 );
+    lv2->addColumn( "Items" );
+    lv2->setRootIsDecorated( TRUE );
+
+    // another widget needed for layouting only
+    tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // create another pushbutton...
+    TQPushButton *copy2 = new TQPushButton( "  ->  ", this );
+    lay->addWidget( copy2 );
+    copy2->setMaximumWidth( copy2->sizeHint().width() );
+    // ...and connect its clicked() SIGNAL to the copy2to3() SLOT
+    connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) );
+
+    tmp = new TQVBoxLayout( lay );
+    tmp->setMargin( 5 );
+
+    // and create a label which will be at the right of the window
+    label = new TQLabel( "No Item yet...", this );
+    tmp->addWidget( label );
+}
+
+/*
+ * SLOT copy1to2()
+ *
+ * Copies all checked ListViewItems from the first ListView to
+ * the second one, and inserts them as Radio-ListViewItem.
+ */
+
+void CheckLists::copy1to2()
+{
+    // create an iterator which operates on the first ListView
+    TQListViewItemIterator it( lv1 );
+
+    lv2->clear();
+
+    // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
+    // are inserted into a Listview, the parent item of these MUST be a controller Item!
+    TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller );
+    item->setOpen( TRUE );
+
+    // iterate through the first ListView...
+    for ( ; it.current(); ++it )
+        // ...check state of childs, and...
+        if ( it.current()->parent() )
+            // ...if the item is checked...
+            if ( ( (TQCheckListItem*)it.current() )->isOn() )
+                // ...insert a Radio-ListViewItem with the same text into the second ListView
+                (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton );
+
+    if ( item->firstChild() )
+        ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE );
+}
+
+/*
+ * SLOT copy2to3()
+ *
+ * Copies the checked item of the second ListView into the
+ * Label at the right.
+ */
+
+void CheckLists::copy2to3()
+{
+    // create an iterator which operates on the second ListView
+    TQListViewItemIterator it( lv2 );
+
+    label->setText( "No Item checked" );
+
+    // iterate through the second ListView...
+    for ( ; it.current(); ++it )
+        // ...check state of childs, and...
+        if ( it.current()->parent() )
+            // ...if the item is checked...
+            if ( ( (TQCheckListItem*)it.current() )->isOn() )
+                // ...set the text of the item to the label
+                label->setText( it.current()->text( 0 ) );
+}
+
+
+ +


+

Main: +

/****************************************************************************
+** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
+**
+** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
+**
+** This file is part of an example program for TQt.  This example
+** program may be used, distributed and modified without limitation.
+**
+*****************************************************************************/
+
+#include "checklists.h"
+#include <ntqapplication.h>
+
+int main( int argc, char **argv )
+{
+    TQApplication a( argc, argv );
+
+    CheckLists checklists;
+    checklists.resize( 650, 350 );
+    checklists.setCaption( "TQt Example - CheckLists" );
+    a.setMainWidget( &checklists );
+    checklists.show();
+
+    return a.exec();
+}
+
+ +

See also Examples. + + +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/chectdelists-example.html b/doc/html/chectdelists-example.html deleted file mode 100644 index 54f945f02..000000000 --- a/doc/html/chectdelists-example.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - -Listviews with Checkable Items - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

Listviews with Checkable Items

- - -

-This example program shows how to use listviews with different types of -checkable items. -


-

Header file: -

/****************************************************************************
-** $Id: qt/checklists.h   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#ifndef CHECKLISTS_H
-#define CHECKLISTS_H
-
-#include <ntqwidget.h>
-
-class TQListView;
-class TQLabel;
-
-class CheckLists : public TQWidget
-{
-    TQ_OBJECT
-
-public:
-    CheckLists( TQWidget *parent = 0, const char *name = 0 );
-
-protected:
-    TQListView *lv1, *lv2;
-    TQLabel *label;
-
-protected slots:
-    void copy1to2();
-    void copy2to3();
-
-};
-
-#endif
-
- -


-

Implementation: -

/****************************************************************************
-** $Id: qt/checklists.cpp   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#include "checklists.h"
-
-#include <ntqlistview.h>
-#include <ntqvbox.h>
-#include <ntqlabel.h>
-#include <ntqvaluelist.h>
-#include <ntqstring.h>
-#include <ntqpushbutton.h>
-#include <ntqlayout.h>
-
-/*
- * Constructor
- *
- * Create all child widgets of the CheckList Widget
- */
-
-CheckLists::CheckLists( TQWidget *parent, const char *name )
-    : TQWidget( parent, name )
-{
-    TQHBoxLayout *lay = new TQHBoxLayout( this );
-    lay->setMargin( 5 );
-
-    // create a widget which layouts its childs in a column
-    TQVBoxLayout *vbox1 = new TQVBoxLayout( lay );
-    vbox1->setMargin( 5 );
-
-    // First child: a Label
-    vbox1->addWidget( new TQLabel( "Check some items!", this ) );
-
-    // Second child: the ListView
-    lv1 = new TQListView( this );
-    vbox1->addWidget( lv1 );
-    lv1->addColumn( "Items" );
-    lv1->setRootIsDecorated( TRUE );
-
-    // create a list with 4 ListViewItems which will be parent items of other ListViewItems
-    TQValueList<TQListViewItem *> parentList;
-
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) );
-    parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) );
-
-    TQListViewItem *item = 0;
-    unsigned int num = 1;
-    // go through the list of parent items...
-    for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
-          ( *it )->setOpen( TRUE ), ++it, num++ ) {
-        item = *it;
-        // ...and create 5 checkable child ListViewItems for each parent item
-        for ( unsigned int i = 1; i <= 5; i++ )
-            (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox );
-    }
-
-    // Create another widget for layouting
-    TQVBoxLayout *tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // create a pushbutton
-    TQPushButton *copy1 = new TQPushButton( "  ->  ", this );
-    tmp->addWidget( copy1 );
-    copy1->setMaximumWidth( copy1->sizeHint().width() );
-    // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2()
-    connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) );
-
-    // another widget for layouting
-    TQVBoxLayout *vbox2 = new TQVBoxLayout( lay );
-    vbox2->setMargin( 5 );
-
-    // and another label
-    vbox2->addWidget( new TQLabel( "Check one item!", this ) );
-
-    // create the second listview
-    lv2 = new TQListView( this );
-    vbox2->addWidget( lv2 );
-    lv2->addColumn( "Items" );
-    lv2->setRootIsDecorated( TRUE );
-
-    // another widget needed for layouting only
-    tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // create another pushbutton...
-    TQPushButton *copy2 = new TQPushButton( "  ->  ", this );
-    lay->addWidget( copy2 );
-    copy2->setMaximumWidth( copy2->sizeHint().width() );
-    // ...and connect its clicked() SIGNAL to the copy2to3() SLOT
-    connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) );
-
-    tmp = new TQVBoxLayout( lay );
-    tmp->setMargin( 5 );
-
-    // and create a label which will be at the right of the window
-    label = new TQLabel( "No Item yet...", this );
-    tmp->addWidget( label );
-}
-
-/*
- * SLOT copy1to2()
- *
- * Copies all checked ListViewItems from the first ListView to
- * the second one, and inserts them as Radio-ListViewItem.
- */
-
-void CheckLists::copy1to2()
-{
-    // create an iterator which operates on the first ListView
-    TQListViewItemIterator it( lv1 );
-
-    lv2->clear();
-
-    // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
-    // are inserted into a Listview, the parent item of these MUST be a controller Item!
-    TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller );
-    item->setOpen( TRUE );
-
-    // iterate through the first ListView...
-    for ( ; it.current(); ++it )
-        // ...check state of childs, and...
-        if ( it.current()->parent() )
-            // ...if the item is checked...
-            if ( ( (TQCheckListItem*)it.current() )->isOn() )
-                // ...insert a Radio-ListViewItem with the same text into the second ListView
-                (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton );
-
-    if ( item->firstChild() )
-        ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE );
-}
-
-/*
- * SLOT copy2to3()
- *
- * Copies the checked item of the second ListView into the
- * Label at the right.
- */
-
-void CheckLists::copy2to3()
-{
-    // create an iterator which operates on the second ListView
-    TQListViewItemIterator it( lv2 );
-
-    label->setText( "No Item checked" );
-
-    // iterate through the second ListView...
-    for ( ; it.current(); ++it )
-        // ...check state of childs, and...
-        if ( it.current()->parent() )
-            // ...if the item is checked...
-            if ( ( (TQCheckListItem*)it.current() )->isOn() )
-                // ...set the text of the item to the label
-                label->setText( it.current()->text( 0 ) );
-}
-
-
- -


-

Main: -

/****************************************************************************
-** $Id: qt/main.cpp   3.3.8   edited Jan 11 14:37 $
-**
-** Copyright (C) 1992-2007 Trolltech ASA.  All rights reserved.
-**
-** This file is part of an example program for TQt.  This example
-** program may be used, distributed and modified without limitation.
-**
-*****************************************************************************/
-
-#include "checklists.h"
-#include <ntqapplication.h>
-
-int main( int argc, char **argv )
-{
-    TQApplication a( argc, argv );
-
-    CheckLists checklists;
-    checklists.resize( 650, 350 );
-    checklists.setCaption( "TQt Example - CheckLists" );
-    a.setMainWidget( &checklists );
-    checklists.show();
-
-    return a.exec();
-}
-
- -

See also Examples. - - -


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/html/qchecklistitem-members.html b/doc/html/qchecklistitem-members.html new file mode 100644 index 000000000..390cd7b0f --- /dev/null +++ b/doc/html/qchecklistitem-members.html @@ -0,0 +1,120 @@ + + + + + +TQCheckListItem Member List + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Complete Member List for TQCheckListItem

+ +

This is the complete list of member functions for +TQCheckListItem, including inherited members. + +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchecklistitem.html b/doc/html/qchecklistitem.html new file mode 100644 index 000000000..eed2dd1c5 --- /dev/null +++ b/doc/html/qchecklistitem.html @@ -0,0 +1,256 @@ + + + + + +TQCheckListItem Class + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

TQCheckListItem Class Reference

+ +

The TQCheckListItem class provides checkable list view items. +More... +

#include <ntqlistview.h> +

Inherits TQListViewItem. +

List of all member functions. +

Public Members

+
    +
  • enum Type { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }
  • +
  • enum ToggleState { Off, NoChange, On }
  • +
  • TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • +
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p )
  • +
  • TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p )
  • +
  • ~TQCheckListItem ()
  • +
  • virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
  • +
  • virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )
  • +
  • virtual void setOn ( bool b )
  • +
  • bool isOn () const
  • +
  • Type type () const
  • +
  • TQString text () const
  • +
  • void setTristate ( bool b )
  • +
  • bool isTristate () const
  • +
  • ToggleState state () const
  • +
  • void setState ( ToggleState s )
  • +
  • virtual int rtti () const
  • +
+

Protected Members

+ +

Detailed Description

+ + +The TQCheckListItem class provides checkable list view items. +

+

TQCheckListItems are used in TQListViews to provide +TQListViewItems that are checkboxes, radio buttons or +controllers. +

Checkbox and controller check list items may be inserted at any +level in a list view. Radio button check list items must be +children of a controller check list item. +

The item can be checked or unchecked with setOn(). Its type can be +retrieved with type() and its text retrieved with text(). +

List View Items
+

See also TQListViewItem, TQListView, and Advanced Widgets. + +


Member Type Documentation

+

TQCheckListItem::ToggleState

+ +

This enum specifies a TQCheckListItem's toggle state. +

    +
  • TQCheckListItem::Off +
  • TQCheckListItem::NoChange +
  • TQCheckListItem::On +
+

TQCheckListItem::Type

+ +

This enum type specifies a TQCheckListItem's type: +

    +
  • TQCheckListItem::RadioButton +
  • TQCheckListItem::CheckBox +
  • TQCheckListItem::Controller - obsolete (use RadioButtonController instead) +
  • TQCheckListItem::RadioButtonController +
  • TQCheckListItem::CheckBoxController +
+

Member Function Documentation

+

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that a RadioButton must be the child of a +RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, and with text text +and of type tt. Note that a RadioButton must be the child of +a RadioButtonController, otherwise it will not toggle. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, text text +and of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) +

+Constructs a checkable item with parent parent, which is after +after in the parent's list of children, with text text and +of type tt. Note that tt must not be RadioButton. +Radio buttons must be children of a RadioButtonController. + +

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p ) +

+Constructs a RadioButtonController item with parent parent, +text text and pixmap p. + +

TQCheckListItem::~TQCheckListItem () +

+Destroys the item, and all its children to any depth, freeing up +all allocated resources. + +

void TQCheckListItem::activate () [virtual protected] +

+Toggle check box or set radio button to on. + +

Reimplemented from TQListViewItem. +

bool TQCheckListItem::isOn () const +

+ +

Returns TRUE if the item is toggled on; otherwise returns FALSE. + +

bool TQCheckListItem::isTristate () const +

+Returns TRUE if the item is tristate; otherwise returns FALSE. +

See also setTristate(). + +

void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] +

+Paints the item using the painter p and the color group cg. +The item is in column column, has width width and has +alignment align. (See TQt::AlignmentFlags for valid alignments.) + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] +

+Draws the focus rectangle r using the color group cg on the +painter p. + +

Reimplemented from TQListViewItem. +

int TQCheckListItem::rtti () const [virtual] +

+ +

Returns 1. +

Make your derived classes return their own values for rtti(), and +you can distinguish between list view items. You should use values +greater than 1000, to allow for extensions to this class. + +

Reimplemented from TQListViewItem. +

void TQCheckListItem::setOn ( bool b ) [virtual] +

+Sets the button on if b is TRUE, otherwise sets it off. +Maintains radio button exclusivity. + +

void TQCheckListItem::setState ( ToggleState s ) +

+Sets the toggle state of the checklistitem to s. s can be +Off, NoChange or On. +

Tristate can only be enabled for CheckBox or CheckBoxController, +therefore the NoChange only applies to them. +

Setting the state to On or Off on a CheckBoxController +will recursivly set the states of its children to the same state. +

Setting the state to NoChange on a CheckBoxController will +make it recursivly recall the previous stored state of its +children. If there was no previous stored state the children are +all set to On. + +

void TQCheckListItem::setTristate ( bool b ) +

+Sets tristate to b if the Type is either a CheckBoxController or +a CheckBox. +

CheckBoxControllers are tristate by default. +

See also state() and isTristate(). + +

ToggleState TQCheckListItem::state () const +

+Returns the state of the item. +

See also TQCheckListItem::ToggleState. + +

void TQCheckListItem::stateChange ( bool ) [virtual protected] +

+This virtual function is called when the item changes its state. +NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so +use state() to determine if the state is actually Off or NoChange. + +

TQString TQCheckListItem::text () const +

+ +

Returns the item's text. + +

void TQCheckListItem::turnOffChild () [protected] +

+If this is a RadioButtonController that has RadioButton +children, turn off the child that is on. + +

Type TQCheckListItem::type () const +

+ +

Returns the type of this item. + + +


+This file is part of the TQt toolkit. +Copyright © 1995-2007 +Trolltech. All Rights Reserved.


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ diff --git a/doc/html/qchectdelistitem-members.html b/doc/html/qchectdelistitem-members.html deleted file mode 100644 index 390cd7b0f..000000000 --- a/doc/html/qchectdelistitem-members.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - -TQCheckListItem Member List - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

Complete Member List for TQCheckListItem

- -

This is the complete list of member functions for -TQCheckListItem, including inherited members. - -

- -


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/html/qchectdelistitem.html b/doc/html/qchectdelistitem.html deleted file mode 100644 index eed2dd1c5..000000000 --- a/doc/html/qchectdelistitem.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - -TQCheckListItem Class - - - - - - - -
- -Home - | -All Classes - | -Main Classes - | -Annotated - | -Grouped Classes - | -Functions -

TQCheckListItem Class Reference

- -

The TQCheckListItem class provides checkable list view items. -More... -

#include <ntqlistview.h> -

Inherits TQListViewItem. -

List of all member functions. -

Public Members

-
    -
  • enum Type { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }
  • -
  • enum ToggleState { Off, NoChange, On }
  • -
  • TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController )
  • -
  • TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p )
  • -
  • TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p )
  • -
  • ~TQCheckListItem ()
  • -
  • virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
  • -
  • virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r )
  • -
  • virtual void setOn ( bool b )
  • -
  • bool isOn () const
  • -
  • Type type () const
  • -
  • TQString text () const
  • -
  • void setTristate ( bool b )
  • -
  • bool isTristate () const
  • -
  • ToggleState state () const
  • -
  • void setState ( ToggleState s )
  • -
  • virtual int rtti () const
  • -
-

Protected Members

- -

Detailed Description

- - -The TQCheckListItem class provides checkable list view items. -

-

TQCheckListItems are used in TQListViews to provide -TQListViewItems that are checkboxes, radio buttons or -controllers. -

Checkbox and controller check list items may be inserted at any -level in a list view. Radio button check list items must be -children of a controller check list item. -

The item can be checked or unchecked with setOn(). Its type can be -retrieved with type() and its text retrieved with text(). -

List View Items
-

See also TQListViewItem, TQListView, and Advanced Widgets. - -


Member Type Documentation

-

TQCheckListItem::ToggleState

- -

This enum specifies a TQCheckListItem's toggle state. -

    -
  • TQCheckListItem::Off -
  • TQCheckListItem::NoChange -
  • TQCheckListItem::On -
-

TQCheckListItem::Type

- -

This enum type specifies a TQCheckListItem's type: -

    -
  • TQCheckListItem::RadioButton -
  • TQCheckListItem::CheckBox -
  • TQCheckListItem::Controller - obsolete (use RadioButtonController instead) -
  • TQCheckListItem::RadioButtonController -
  • TQCheckListItem::CheckBoxController -
-

Member Function Documentation

-

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that a RadioButton must be the child of a -RadioButtonController, otherwise it will not toggle. - -

TQCheckListItem::TQCheckListItem ( TQCheckListItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, and with text text -and of type tt. Note that a RadioButton must be the child of -a RadioButtonController, otherwise it will not toggle. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, with text text and -of type tt. Note that this item must not be a RadioButton. Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, text text -and of type tt. Note that tt must not be RadioButton. -Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, TQListViewItem * after, const TQString & text, Type tt = RadioButtonController ) -

-Constructs a checkable item with parent parent, which is after -after in the parent's list of children, with text text and -of type tt. Note that tt must not be RadioButton. -Radio buttons must be children of a RadioButtonController. - -

TQCheckListItem::TQCheckListItem ( TQListViewItem * parent, const TQString & text, const TQPixmap & p ) -

-Constructs a RadioButtonController item with parent parent, -text text and pixmap p. - -

TQCheckListItem::TQCheckListItem ( TQListView * parent, const TQString & text, const TQPixmap & p ) -

-Constructs a RadioButtonController item with parent parent, -text text and pixmap p. - -

TQCheckListItem::~TQCheckListItem () -

-Destroys the item, and all its children to any depth, freeing up -all allocated resources. - -

void TQCheckListItem::activate () [virtual protected] -

-Toggle check box or set radio button to on. - -

Reimplemented from TQListViewItem. -

bool TQCheckListItem::isOn () const -

- -

Returns TRUE if the item is toggled on; otherwise returns FALSE. - -

bool TQCheckListItem::isTristate () const -

-Returns TRUE if the item is tristate; otherwise returns FALSE. -

See also setTristate(). - -

void TQCheckListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) [virtual] -

-Paints the item using the painter p and the color group cg. -The item is in column column, has width width and has -alignment align. (See TQt::AlignmentFlags for valid alignments.) - -

Reimplemented from TQListViewItem. -

void TQCheckListItem::paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r ) [virtual] -

-Draws the focus rectangle r using the color group cg on the -painter p. - -

Reimplemented from TQListViewItem. -

int TQCheckListItem::rtti () const [virtual] -

- -

Returns 1. -

Make your derived classes return their own values for rtti(), and -you can distinguish between list view items. You should use values -greater than 1000, to allow for extensions to this class. - -

Reimplemented from TQListViewItem. -

void TQCheckListItem::setOn ( bool b ) [virtual] -

-Sets the button on if b is TRUE, otherwise sets it off. -Maintains radio button exclusivity. - -

void TQCheckListItem::setState ( ToggleState s ) -

-Sets the toggle state of the checklistitem to s. s can be -Off, NoChange or On. -

Tristate can only be enabled for CheckBox or CheckBoxController, -therefore the NoChange only applies to them. -

Setting the state to On or Off on a CheckBoxController -will recursivly set the states of its children to the same state. -

Setting the state to NoChange on a CheckBoxController will -make it recursivly recall the previous stored state of its -children. If there was no previous stored state the children are -all set to On. - -

void TQCheckListItem::setTristate ( bool b ) -

-Sets tristate to b if the Type is either a CheckBoxController or -a CheckBox. -

CheckBoxControllers are tristate by default. -

See also state() and isTristate(). - -

ToggleState TQCheckListItem::state () const -

-Returns the state of the item. -

See also TQCheckListItem::ToggleState. - -

void TQCheckListItem::stateChange ( bool ) [virtual protected] -

-This virtual function is called when the item changes its state. -NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so -use state() to determine if the state is actually Off or NoChange. - -

TQString TQCheckListItem::text () const -

- -

Returns the item's text. - -

void TQCheckListItem::turnOffChild () [protected] -

-If this is a RadioButtonController that has RadioButton -children, turn off the child that is on. - -

Type TQCheckListItem::type () const -

- -

Returns the type of this item. - - -


-This file is part of the TQt toolkit. -Copyright © 1995-2007 -Trolltech. All Rights Reserved.


- -
Copyright © 2007 -TrolltechTrademarks -
TQt 3.3.8
-
- diff --git a/doc/man/man3/qchecklistitem.3qt b/doc/man/man3/qchecklistitem.3qt new file mode 100644 index 000000000..1b156e9d0 --- /dev/null +++ b/doc/man/man3/qchecklistitem.3qt @@ -0,0 +1,229 @@ +'\" t +.TH QCheckListItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- +.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the +.\" license file included in the distribution for a complete license +.\" statement. +.\" +.ad l +.nh +.SH NAME +QCheckListItem \- Checkable list view items +.SH SYNOPSIS +\fC#include \fR +.PP +Inherits QListViewItem. +.PP +.SS "Public Members" +.in +1c +.ti -1c +.BI "enum \fBType\fR { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }" +.br +.ti -1c +.BI "enum \fBToggleState\fR { Off, NoChange, On }" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, const QPixmap & p )" +.br +.ti -1c +.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, const QPixmap & p )" +.br +.ti -1c +.BI "\fB~QCheckListItem\fR ()" +.br +.ti -1c +.BI "virtual void \fBpaintCell\fR ( QPainter * p, const QColorGroup & cg, int column, int width, int align )" +.br +.ti -1c +.BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg, const QRect & r )" +.br +.ti -1c +.BI "virtual void \fBsetOn\fR ( bool b )" +.br +.ti -1c +.BI "bool \fBisOn\fR () const" +.br +.ti -1c +.BI "Type \fBtype\fR () const" +.br +.ti -1c +.BI "QString \fBtext\fR () const" +.br +.ti -1c +.BI "void \fBsetTristate\fR ( bool b )" +.br +.ti -1c +.BI "bool \fBisTristate\fR () const" +.br +.ti -1c +.BI "ToggleState \fBstate\fR () const" +.br +.ti -1c +.BI "void \fBsetState\fR ( ToggleState s )" +.br +.ti -1c +.BI "virtual int \fBrtti\fR () const" +.br +.in -1c +.SS "Protected Members" +.in +1c +.ti -1c +.BI "virtual void \fBactivate\fR ()" +.br +.ti -1c +.BI "void \fBturnOffChild\fR ()" +.br +.ti -1c +.BI "virtual void \fBstateChange\fR ( bool )" +.br +.in -1c +.SH DESCRIPTION +The QCheckListItem class provides checkable list view items. +.PP +QCheckListItems are used in QListViews to provide QListViewItems that are checkboxes, radio buttons or controllers. +.PP +Checkbox and controller check list items may be inserted at any level in a list view. Radio button check list items must be children of a controller check list item. +.PP +The item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text(). +.PP +
+.ce 1 +.B "[Image Omitted]" +.PP +
+.PP +See also QListViewItem, QListView, and Advanced Widgets. +.SS "Member Type Documentation" +.SH "QCheckListItem::ToggleState" +This enum specifies a QCheckListItem's toggle state. +.TP +\fCQCheckListItem::Off\fR +.TP +\fCQCheckListItem::NoChange\fR +.TP +\fCQCheckListItem::On\fR +.SH "QCheckListItem::Type" +This enum type specifies a QCheckListItem's type: +.TP +\fCQCheckListItem::RadioButton\fR +.TP +\fCQCheckListItem::CheckBox\fR +.TP +\fCQCheckListItem::Controller\fR - \fIobsolete\fR (use RadioButtonController instead) +.TP +\fCQCheckListItem::RadioButtonController\fR +.TP +\fCQCheckListItem::CheckBoxController\fR +.SH MEMBER FUNCTION DOCUMENTATION +.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. +.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, and with text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" +Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. +.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )" +Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. +.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )" +Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. +.SH "QCheckListItem::~QCheckListItem ()" +Destroys the item, and all its children to any depth, freeing up all allocated resources. +.SH "void QCheckListItem::activate ()\fC [virtual protected]\fR" +Toggle check box or set radio button to on. +.PP +Reimplemented from QListViewItem. +.SH "bool QCheckListItem::isOn () const" +Returns TRUE if the item is toggled on; otherwise returns FALSE. +.SH "bool QCheckListItem::isTristate () const" +Returns TRUE if the item is tristate; otherwise returns FALSE. +.PP +See also setTristate(). +.SH "void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )\fC [virtual]\fR" +Paints the item using the painter \fIp\fR and the color group \fIcg\fR. The item is in column \fIcolumn\fR, has width \fIwidth\fR and has alignment \fIalign\fR. (See Qt::AlignmentFlags for valid alignments.) +.PP +Reimplemented from QListViewItem. +.SH "void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r )\fC [virtual]\fR" +Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR. +.PP +Reimplemented from QListViewItem. +.SH "int QCheckListItem::rtti () const\fC [virtual]\fR" +Returns 1. +.PP +Make your derived classes return their own values for rtti(), and you can distinguish between list view items. You should use values greater than 1000, to allow for extensions to this class. +.PP +Reimplemented from QListViewItem. +.SH "void QCheckListItem::setOn ( bool b )\fC [virtual]\fR" +Sets the button on if \fIb\fR is TRUE, otherwise sets it off. Maintains radio button exclusivity. +.SH "void QCheckListItem::setState ( ToggleState s )" +Sets the toggle state of the checklistitem to \fIs\fR. \fIs\fR can be Off, NoChange or On. +.PP +Tristate can only be enabled for CheckBox or CheckBoxController, therefore the NoChange only applies to them. +.PP +Setting the state to On or Off on a CheckBoxController will recursivly set the states of its children to the same state. +.PP +Setting the state to NoChange on a CheckBoxController will make it recursivly recall the previous stored state of its children. If there was no previous stored state the children are all set to On. +.SH "void QCheckListItem::setTristate ( bool b )" +Sets tristate to \fIb\fR if the Type is either a CheckBoxController or a CheckBox. +.PP +\fCCheckBoxControllers\fR are tristate by default. +.PP +See also state() and isTristate(). +.SH "ToggleState QCheckListItem::state () const" +Returns the state of the item. +.PP +See also QCheckListItem::ToggleState. +.SH "void QCheckListItem::stateChange ( bool )\fC [virtual protected]\fR" +This virtual function is called when the item changes its state. NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so use state() to determine if the state is actually Off or NoChange. +.SH "QString QCheckListItem::text () const" +Returns the item's text. +.SH "void QCheckListItem::turnOffChild ()\fC [protected]\fR" +If this is a RadioButtonController that has RadioButton children, turn off the child that is on. +.SH "Type QCheckListItem::type () const" +Returns the type of this item. + +.SH "SEE ALSO" +.BR http://doc.trolltech.com/qchecklistitem.html +.BR http://www.trolltech.com/faq/tech.html +.SH COPYRIGHT +Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the +license file included in the distribution for a complete license +statement. +.SH AUTHOR +Generated automatically from the source code. +.SH BUGS +If you find a bug in Qt, please report it as described in +.BR http://doc.trolltech.com/bughowto.html . +Good bug reports help us to help you. Thank you. +.P +The definitive Qt documentation is provided in HTML format; it is +located at $QTDIR/doc/html and can be read using Qt Assistant or with +a web browser. This man page is provided as a convenience for those +users who prefer man pages, although this format is not officially +supported by Trolltech. +.P +If you find errors in this manual page, please report them to +.BR qt-bugs@trolltech.com . +Please include the name of the manual page (qchecklistitem.3qt) and the Qt +version (3.3.8). diff --git a/doc/man/man3/qchectdelistitem.3qt b/doc/man/man3/qchectdelistitem.3qt deleted file mode 100644 index 1b156e9d0..000000000 --- a/doc/man/man3/qchectdelistitem.3qt +++ /dev/null @@ -1,229 +0,0 @@ -'\" t -.TH QCheckListItem 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- -.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the -.\" license file included in the distribution for a complete license -.\" statement. -.\" -.ad l -.nh -.SH NAME -QCheckListItem \- Checkable list view items -.SH SYNOPSIS -\fC#include \fR -.PP -Inherits QListViewItem. -.PP -.SS "Public Members" -.in +1c -.ti -1c -.BI "enum \fBType\fR { RadioButton, CheckBox, Controller, RadioButtonController = Controller, CheckBoxController }" -.br -.ti -1c -.BI "enum \fBToggleState\fR { Off, NoChange, On }" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListViewItem * parent, const QString & text, const QPixmap & p )" -.br -.ti -1c -.BI "\fBQCheckListItem\fR ( QListView * parent, const QString & text, const QPixmap & p )" -.br -.ti -1c -.BI "\fB~QCheckListItem\fR ()" -.br -.ti -1c -.BI "virtual void \fBpaintCell\fR ( QPainter * p, const QColorGroup & cg, int column, int width, int align )" -.br -.ti -1c -.BI "virtual void \fBpaintFocus\fR ( QPainter * p, const QColorGroup & cg, const QRect & r )" -.br -.ti -1c -.BI "virtual void \fBsetOn\fR ( bool b )" -.br -.ti -1c -.BI "bool \fBisOn\fR () const" -.br -.ti -1c -.BI "Type \fBtype\fR () const" -.br -.ti -1c -.BI "QString \fBtext\fR () const" -.br -.ti -1c -.BI "void \fBsetTristate\fR ( bool b )" -.br -.ti -1c -.BI "bool \fBisTristate\fR () const" -.br -.ti -1c -.BI "ToggleState \fBstate\fR () const" -.br -.ti -1c -.BI "void \fBsetState\fR ( ToggleState s )" -.br -.ti -1c -.BI "virtual int \fBrtti\fR () const" -.br -.in -1c -.SS "Protected Members" -.in +1c -.ti -1c -.BI "virtual void \fBactivate\fR ()" -.br -.ti -1c -.BI "void \fBturnOffChild\fR ()" -.br -.ti -1c -.BI "virtual void \fBstateChange\fR ( bool )" -.br -.in -1c -.SH DESCRIPTION -The QCheckListItem class provides checkable list view items. -.PP -QCheckListItems are used in QListViews to provide QListViewItems that are checkboxes, radio buttons or controllers. -.PP -Checkbox and controller check list items may be inserted at any level in a list view. Radio button check list items must be children of a controller check list item. -.PP -The item can be checked or unchecked with setOn(). Its type can be retrieved with type() and its text retrieved with text(). -.PP -
-.ce 1 -.B "[Image Omitted]" -.PP -
-.PP -See also QListViewItem, QListView, and Advanced Widgets. -.SS "Member Type Documentation" -.SH "QCheckListItem::ToggleState" -This enum specifies a QCheckListItem's toggle state. -.TP -\fCQCheckListItem::Off\fR -.TP -\fCQCheckListItem::NoChange\fR -.TP -\fCQCheckListItem::On\fR -.SH "QCheckListItem::Type" -This enum type specifies a QCheckListItem's type: -.TP -\fCQCheckListItem::RadioButton\fR -.TP -\fCQCheckListItem::CheckBox\fR -.TP -\fCQCheckListItem::Controller\fR - \fIobsolete\fR (use RadioButtonController instead) -.TP -\fCQCheckListItem::RadioButtonController\fR -.TP -\fCQCheckListItem::CheckBoxController\fR -.SH MEMBER FUNCTION DOCUMENTATION -.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. -.SH "QCheckListItem::QCheckListItem ( QCheckListItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, and with text \fItext\fR and of type \fItt\fR. Note that a RadioButton must be the child of a RadioButtonController, otherwise it will not toggle. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that this item must \fInot\fR be a RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, QListViewItem * after, const QString & text, Type tt = RadioButtonController )" -Constructs a checkable item with parent \fIparent\fR, which is after \fIafter\fR in the parent's list of children, with text \fItext\fR and of type \fItt\fR. Note that \fItt\fR must \fInot\fR be RadioButton. Radio buttons must be children of a RadioButtonController. -.SH "QCheckListItem::QCheckListItem ( QListViewItem * parent, const QString & text, const QPixmap & p )" -Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. -.SH "QCheckListItem::QCheckListItem ( QListView * parent, const QString & text, const QPixmap & p )" -Constructs a RadioButtonController item with parent \fIparent\fR, text \fItext\fR and pixmap \fIp\fR. -.SH "QCheckListItem::~QCheckListItem ()" -Destroys the item, and all its children to any depth, freeing up all allocated resources. -.SH "void QCheckListItem::activate ()\fC [virtual protected]\fR" -Toggle check box or set radio button to on. -.PP -Reimplemented from QListViewItem. -.SH "bool QCheckListItem::isOn () const" -Returns TRUE if the item is toggled on; otherwise returns FALSE. -.SH "bool QCheckListItem::isTristate () const" -Returns TRUE if the item is tristate; otherwise returns FALSE. -.PP -See also setTristate(). -.SH "void QCheckListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align )\fC [virtual]\fR" -Paints the item using the painter \fIp\fR and the color group \fIcg\fR. The item is in column \fIcolumn\fR, has width \fIwidth\fR and has alignment \fIalign\fR. (See Qt::AlignmentFlags for valid alignments.) -.PP -Reimplemented from QListViewItem. -.SH "void QCheckListItem::paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r )\fC [virtual]\fR" -Draws the focus rectangle \fIr\fR using the color group \fIcg\fR on the painter \fIp\fR. -.PP -Reimplemented from QListViewItem. -.SH "int QCheckListItem::rtti () const\fC [virtual]\fR" -Returns 1. -.PP -Make your derived classes return their own values for rtti(), and you can distinguish between list view items. You should use values greater than 1000, to allow for extensions to this class. -.PP -Reimplemented from QListViewItem. -.SH "void QCheckListItem::setOn ( bool b )\fC [virtual]\fR" -Sets the button on if \fIb\fR is TRUE, otherwise sets it off. Maintains radio button exclusivity. -.SH "void QCheckListItem::setState ( ToggleState s )" -Sets the toggle state of the checklistitem to \fIs\fR. \fIs\fR can be Off, NoChange or On. -.PP -Tristate can only be enabled for CheckBox or CheckBoxController, therefore the NoChange only applies to them. -.PP -Setting the state to On or Off on a CheckBoxController will recursivly set the states of its children to the same state. -.PP -Setting the state to NoChange on a CheckBoxController will make it recursivly recall the previous stored state of its children. If there was no previous stored state the children are all set to On. -.SH "void QCheckListItem::setTristate ( bool b )" -Sets tristate to \fIb\fR if the Type is either a CheckBoxController or a CheckBox. -.PP -\fCCheckBoxControllers\fR are tristate by default. -.PP -See also state() and isTristate(). -.SH "ToggleState QCheckListItem::state () const" -Returns the state of the item. -.PP -See also QCheckListItem::ToggleState. -.SH "void QCheckListItem::stateChange ( bool )\fC [virtual protected]\fR" -This virtual function is called when the item changes its state. NoChange (if tristate is enabled and the type is either CheckBox or CheckBoxController) reports the same as Off, so use state() to determine if the state is actually Off or NoChange. -.SH "QString QCheckListItem::text () const" -Returns the item's text. -.SH "void QCheckListItem::turnOffChild ()\fC [protected]\fR" -If this is a RadioButtonController that has RadioButton children, turn off the child that is on. -.SH "Type QCheckListItem::type () const" -Returns the type of this item. - -.SH "SEE ALSO" -.BR http://doc.trolltech.com/qchecklistitem.html -.BR http://www.trolltech.com/faq/tech.html -.SH COPYRIGHT -Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the -license file included in the distribution for a complete license -statement. -.SH AUTHOR -Generated automatically from the source code. -.SH BUGS -If you find a bug in Qt, please report it as described in -.BR http://doc.trolltech.com/bughowto.html . -Good bug reports help us to help you. Thank you. -.P -The definitive Qt documentation is provided in HTML format; it is -located at $QTDIR/doc/html and can be read using Qt Assistant or with -a web browser. This man page is provided as a convenience for those -users who prefer man pages, although this format is not officially -supported by Trolltech. -.P -If you find errors in this manual page, please report them to -.BR qt-bugs@trolltech.com . -Please include the name of the manual page (qchecklistitem.3qt) and the Qt -version (3.3.8). diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp new file mode 100644 index 000000000..08b11fc30 --- /dev/null +++ b/examples/checklists/checklists.cpp @@ -0,0 +1,162 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include "checklists.h" + +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructor + * + * Create all child widgets of the CheckList Widget + */ + +CheckLists::CheckLists( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) +{ + TQHBoxLayout *lay = new TQHBoxLayout( this ); + lay->setMargin( 5 ); + + // create a widget which layouts its childs in a column + TQVBoxLayout *vbox1 = new TQVBoxLayout( lay ); + vbox1->setMargin( 5 ); + + // First child: a Label + vbox1->addWidget( new TQLabel( "Check some items!", this ) ); + + // Second child: the ListView + lv1 = new TQListView( this ); + vbox1->addWidget( lv1 ); + lv1->addColumn( "Items" ); + lv1->setRootIsDecorated( TRUE ); + + // create a list with 4 ListViewItems which will be parent items of other ListViewItems + TQValueList parentList; + + parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); + + TQListViewItem *item = 0; + unsigned int num = 1; + // go through the list of parent items... + for ( TQValueList::Iterator it = parentList.begin(); it != parentList.end(); + ( *it )->setOpen( TRUE ), ++it, num++ ) { + item = *it; + // ...and create 5 checkable child ListViewItems for each parent item + for ( unsigned int i = 1; i <= 5; i++ ) + (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox ); + } + + // Create another widget for layouting + TQVBoxLayout *tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // create a pushbutton + TQPushButton *copy1 = new TQPushButton( " -> ", this ); + tmp->addWidget( copy1 ); + copy1->setMaximumWidth( copy1->sizeHint().width() ); + // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() + connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); + + // another widget for layouting + TQVBoxLayout *vbox2 = new TQVBoxLayout( lay ); + vbox2->setMargin( 5 ); + + // and another label + vbox2->addWidget( new TQLabel( "Check one item!", this ) ); + + // create the second listview + lv2 = new TQListView( this ); + vbox2->addWidget( lv2 ); + lv2->addColumn( "Items" ); + lv2->setRootIsDecorated( TRUE ); + + // another widget needed for layouting only + tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // create another pushbutton... + TQPushButton *copy2 = new TQPushButton( " -> ", this ); + lay->addWidget( copy2 ); + copy2->setMaximumWidth( copy2->sizeHint().width() ); + // ...and connect its clicked() SIGNAL to the copy2to3() SLOT + connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); + + tmp = new TQVBoxLayout( lay ); + tmp->setMargin( 5 ); + + // and create a label which will be at the right of the window + label = new TQLabel( "No Item yet...", this ); + tmp->addWidget( label ); +} + +/* + * SLOT copy1to2() + * + * Copies all checked ListViewItems from the first ListView to + * the second one, and inserts them as Radio-ListViewItem. + */ + +void CheckLists::copy1to2() +{ + // create an iterator which operates on the first ListView + TQListViewItemIterator it( lv1 ); + + lv2->clear(); + + // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems + // are inserted into a Listview, the parent item of these MUST be a controller Item! + TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller ); + item->setOpen( TRUE ); + + // iterate through the first ListView... + for ( ; it.current(); ++it ) + // ...check state of childs, and... + if ( it.current()->parent() ) + // ...if the item is checked... + if ( ( (TQCheckListItem*)it.current() )->isOn() ) + // ...insert a Radio-ListViewItem with the same text into the second ListView + (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton ); + + if ( item->firstChild() ) + ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE ); +} + +/* + * SLOT copy2to3() + * + * Copies the checked item of the second ListView into the + * Label at the right. + */ + +void CheckLists::copy2to3() +{ + // create an iterator which operates on the second ListView + TQListViewItemIterator it( lv2 ); + + label->setText( "No Item checked" ); + + // iterate through the second ListView... + for ( ; it.current(); ++it ) + // ...check state of childs, and... + if ( it.current()->parent() ) + // ...if the item is checked... + if ( ( (TQCheckListItem*)it.current() )->isOn() ) + // ...set the text of the item to the label + label->setText( it.current()->text( 0 ) ); +} + diff --git a/examples/checklists/checklists.doc b/examples/checklists/checklists.doc new file mode 100644 index 000000000..417afe6b7 --- /dev/null +++ b/examples/checklists/checklists.doc @@ -0,0 +1,29 @@ +/* +*/ +/*! \page checklists-example.html + + \ingroup examples + \title Listviews with Checkable Items + + This example program shows how to use listviews with different types of + checkable items. + +
+ + Header file: + + \include checklists/checklists.h + +
+ + Implementation: + + \include checklists/checklists.cpp + +
+ + Main: + + \include checklists/main.cpp +*/ + diff --git a/examples/checklists/checklists.h b/examples/checklists/checklists.h new file mode 100644 index 000000000..d2097dd18 --- /dev/null +++ b/examples/checklists/checklists.h @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#ifndef CHECKLISTS_H +#define CHECKLISTS_H + +#include + +class TQListView; +class TQLabel; + +class CheckLists : public TQWidget +{ + TQ_OBJECT + +public: + CheckLists( TQWidget *parent = 0, const char *name = 0 ); + +protected: + TQListView *lv1, *lv2; + TQLabel *label; + +protected slots: + void copy1to2(); + void copy2to3(); + +}; + +#endif diff --git a/examples/checklists/checklists.pro b/examples/checklists/checklists.pro new file mode 100644 index 000000000..a1a6f12d8 --- /dev/null +++ b/examples/checklists/checklists.pro @@ -0,0 +1,11 @@ +TEMPLATE = app +TARGET = checklists + +CONFIG += qt warn_on release +DEPENDPATH = ../../include + +REQUIRES = large-config + +HEADERS = checklists.h +SOURCES = checklists.cpp \ + main.cpp diff --git a/examples/checklists/main.cpp b/examples/checklists/main.cpp new file mode 100644 index 000000000..65f368348 --- /dev/null +++ b/examples/checklists/main.cpp @@ -0,0 +1,24 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include "checklists.h" +#include + +int main( int argc, char **argv ) +{ + TQApplication a( argc, argv ); + + CheckLists checklists; + checklists.resize( 650, 350 ); + checklists.setCaption( "TQt Example - CheckLists" ); + a.setMainWidget( &checklists ); + checklists.show(); + + return a.exec(); +} diff --git a/examples/chectdelists/chectdelists.cpp b/examples/chectdelists/chectdelists.cpp deleted file mode 100644 index 08b11fc30..000000000 --- a/examples/chectdelists/chectdelists.cpp +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include "checklists.h" - -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructor - * - * Create all child widgets of the CheckList Widget - */ - -CheckLists::CheckLists( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) -{ - TQHBoxLayout *lay = new TQHBoxLayout( this ); - lay->setMargin( 5 ); - - // create a widget which layouts its childs in a column - TQVBoxLayout *vbox1 = new TQVBoxLayout( lay ); - vbox1->setMargin( 5 ); - - // First child: a Label - vbox1->addWidget( new TQLabel( "Check some items!", this ) ); - - // Second child: the ListView - lv1 = new TQListView( this ); - vbox1->addWidget( lv1 ); - lv1->addColumn( "Items" ); - lv1->setRootIsDecorated( TRUE ); - - // create a list with 4 ListViewItems which will be parent items of other ListViewItems - TQValueList parentList; - - parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); - - TQListViewItem *item = 0; - unsigned int num = 1; - // go through the list of parent items... - for ( TQValueList::Iterator it = parentList.begin(); it != parentList.end(); - ( *it )->setOpen( TRUE ), ++it, num++ ) { - item = *it; - // ...and create 5 checkable child ListViewItems for each parent item - for ( unsigned int i = 1; i <= 5; i++ ) - (void)new TQCheckListItem( item, TQString( "%1. Child of Parent %2" ).arg( i ).arg( num ), TQCheckListItem::CheckBox ); - } - - // Create another widget for layouting - TQVBoxLayout *tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // create a pushbutton - TQPushButton *copy1 = new TQPushButton( " -> ", this ); - tmp->addWidget( copy1 ); - copy1->setMaximumWidth( copy1->sizeHint().width() ); - // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() - connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); - - // another widget for layouting - TQVBoxLayout *vbox2 = new TQVBoxLayout( lay ); - vbox2->setMargin( 5 ); - - // and another label - vbox2->addWidget( new TQLabel( "Check one item!", this ) ); - - // create the second listview - lv2 = new TQListView( this ); - vbox2->addWidget( lv2 ); - lv2->addColumn( "Items" ); - lv2->setRootIsDecorated( TRUE ); - - // another widget needed for layouting only - tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // create another pushbutton... - TQPushButton *copy2 = new TQPushButton( " -> ", this ); - lay->addWidget( copy2 ); - copy2->setMaximumWidth( copy2->sizeHint().width() ); - // ...and connect its clicked() SIGNAL to the copy2to3() SLOT - connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); - - tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); - - // and create a label which will be at the right of the window - label = new TQLabel( "No Item yet...", this ); - tmp->addWidget( label ); -} - -/* - * SLOT copy1to2() - * - * Copies all checked ListViewItems from the first ListView to - * the second one, and inserts them as Radio-ListViewItem. - */ - -void CheckLists::copy1to2() -{ - // create an iterator which operates on the first ListView - TQListViewItemIterator it( lv1 ); - - lv2->clear(); - - // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems - // are inserted into a Listview, the parent item of these MUST be a controller Item! - TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller ); - item->setOpen( TRUE ); - - // iterate through the first ListView... - for ( ; it.current(); ++it ) - // ...check state of childs, and... - if ( it.current()->parent() ) - // ...if the item is checked... - if ( ( (TQCheckListItem*)it.current() )->isOn() ) - // ...insert a Radio-ListViewItem with the same text into the second ListView - (void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton ); - - if ( item->firstChild() ) - ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE ); -} - -/* - * SLOT copy2to3() - * - * Copies the checked item of the second ListView into the - * Label at the right. - */ - -void CheckLists::copy2to3() -{ - // create an iterator which operates on the second ListView - TQListViewItemIterator it( lv2 ); - - label->setText( "No Item checked" ); - - // iterate through the second ListView... - for ( ; it.current(); ++it ) - // ...check state of childs, and... - if ( it.current()->parent() ) - // ...if the item is checked... - if ( ( (TQCheckListItem*)it.current() )->isOn() ) - // ...set the text of the item to the label - label->setText( it.current()->text( 0 ) ); -} - diff --git a/examples/chectdelists/chectdelists.doc b/examples/chectdelists/chectdelists.doc deleted file mode 100644 index 417afe6b7..000000000 --- a/examples/chectdelists/chectdelists.doc +++ /dev/null @@ -1,29 +0,0 @@ -/* -*/ -/*! \page checklists-example.html - - \ingroup examples - \title Listviews with Checkable Items - - This example program shows how to use listviews with different types of - checkable items. - -
- - Header file: - - \include checklists/checklists.h - -
- - Implementation: - - \include checklists/checklists.cpp - -
- - Main: - - \include checklists/main.cpp -*/ - diff --git a/examples/chectdelists/chectdelists.h b/examples/chectdelists/chectdelists.h deleted file mode 100644 index d2097dd18..000000000 --- a/examples/chectdelists/chectdelists.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#ifndef CHECKLISTS_H -#define CHECKLISTS_H - -#include - -class TQListView; -class TQLabel; - -class CheckLists : public TQWidget -{ - TQ_OBJECT - -public: - CheckLists( TQWidget *parent = 0, const char *name = 0 ); - -protected: - TQListView *lv1, *lv2; - TQLabel *label; - -protected slots: - void copy1to2(); - void copy2to3(); - -}; - -#endif diff --git a/examples/chectdelists/chectdelists.pro b/examples/chectdelists/chectdelists.pro deleted file mode 100644 index a1a6f12d8..000000000 --- a/examples/chectdelists/chectdelists.pro +++ /dev/null @@ -1,11 +0,0 @@ -TEMPLATE = app -TARGET = checklists - -CONFIG += qt warn_on release -DEPENDPATH = ../../include - -REQUIRES = large-config - -HEADERS = checklists.h -SOURCES = checklists.cpp \ - main.cpp diff --git a/examples/chectdelists/main.cpp b/examples/chectdelists/main.cpp deleted file mode 100644 index 65f368348..000000000 --- a/examples/chectdelists/main.cpp +++ /dev/null @@ -1,24 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include "checklists.h" -#include - -int main( int argc, char **argv ) -{ - TQApplication a( argc, argv ); - - CheckLists checklists; - checklists.resize( 650, 350 ); - checklists.setCaption( "TQt Example - CheckLists" ); - a.setMainWidget( &checklists ); - checklists.show(); - - return a.exec(); -} -- cgit v1.2.1 From fe4ae78df6b03fa65b4efa9cf82b30d96da4e69f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 3 Feb 2013 22:56:02 -0600 Subject: Rename KStyle to TDEStyle to avoid conflicts with KDE4 --- changes-3.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes-3.5 b/changes-3.5 index e05b72522..129b523cc 100644 --- a/changes-3.5 +++ b/changes-3.5 @@ -31,7 +31,7 @@ sizeFromContents styleHint stylePixmap visualRect -drawKStylePrimitive +drawTDEStylePrimitive polish unPolish -- cgit v1.2.1 From 07d10b57b72e366cc793302d8209752927311eec Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 12 Feb 2013 18:15:36 -0600 Subject: Automated update from Qt3 --- src/kernel/qeventloop_glib_p.h | 3 +++ src/kernel/qeventloop_x11_glib.cpp | 32 ++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/kernel/qeventloop_glib_p.h b/src/kernel/qeventloop_glib_p.h index 537406854..7c459ef88 100644 --- a/src/kernel/qeventloop_glib_p.h +++ b/src/kernel/qeventloop_glib_p.h @@ -100,6 +100,8 @@ public: exitloop = FALSE; shortcut = FALSE; singletoolkit = TRUE; + ctx = 0; + ctx_is_default = false; } int looplevel; @@ -129,6 +131,7 @@ public: // main context GMainContext *ctx; + bool ctx_is_default; }; #endif // TQEVENTLOOP_GLIB_P_H diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp index 40205f805..7106bf4e6 100644 --- a/src/kernel/qeventloop_x11_glib.cpp +++ b/src/kernel/qeventloop_x11_glib.cpp @@ -79,8 +79,7 @@ static GSourceFuncs qt_gsource_funcs = { // forward main loop callbacks to TQEventLoop methods! -static gboolean qt_gsource_prepare ( GSource *source, - gint *timeout ) +static gboolean qt_gsource_prepare ( GSource *source, gint *timeout ) { TQtGSource * qtGSource = (TQtGSource*) source; TQEventLoop* candidateEventLoop = qtGSource->qeventLoop; @@ -95,7 +94,7 @@ static gboolean qt_gsource_prepare ( GSource *source, } } -static gboolean qt_gsource_check ( GSource *source ) +static gboolean qt_gsource_check ( GSource *source ) { TQtGSource * qtGSource = (TQtGSource*) source; TQEventLoop* candidateEventLoop = qtGSource->qeventLoop; @@ -110,8 +109,7 @@ static gboolean qt_gsource_check ( GSource *source ) } } -static gboolean qt_gsource_dispatch ( GSource *source, - GSourceFunc callback, gpointer user_data ) +static gboolean qt_gsource_dispatch ( GSource *source, GSourceFunc callback, gpointer user_data ) { Q_UNUSED(callback); Q_UNUSED(user_data); @@ -215,6 +213,7 @@ void TQEventLoop::init() // new main context for thread d->ctx = g_main_context_new(); g_main_context_push_thread_default(d->ctx); + d->ctx_is_default = true; // new GSource TQtGSource * qtGSource = (TQtGSource*) g_source_new(&qt_gsource_funcs, sizeof(TQtGSource)); @@ -241,9 +240,9 @@ void TQEventLoop::init() d->threadPipe_gPollFD.fd = d->thread_pipe[0]; d->threadPipe_gPollFD.events = G_IO_IN | G_IO_HUP | G_IO_ERR; - g_source_add_poll(d->gSource, &d->threadPipe_gPollFD); + g_source_add_poll(d->gSource, &d->threadPipe_gPollFD); -#ifdef DEBUG_QT_GLIBMAINLOOP +#ifdef DEBUG_QT_GLIBMAINLOOP printf("inside init(2)\n"); #endif @@ -375,7 +374,7 @@ bool TQEventLoop::processX11Events() } -bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) +bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) { Q_UNUSED(gs); @@ -428,7 +427,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) #ifdef DEBUG_QT_GLIBMAINLOOP printf("inside gsourcePrepare(2) canwait=%d\n", canWait); -#endif +#endif if ( canWait ) { emit aboutToBlock(); @@ -440,7 +439,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout) (**it)(); } -#ifdef DEBUG_QT_GLIBMAINLOOP +#ifdef DEBUG_QT_GLIBMAINLOOP printf("inside gsourcePrepare(2.1) canwait=%d\n", canWait); #endif @@ -649,4 +648,17 @@ void TQEventLoop::appClosingDown() void TQEventLoop::setSingleToolkitEventHandling(bool enabled) { d->singletoolkit = enabled; + + if (!d->singletoolkit) { + if (d->ctx_is_default) { + d->ctx_is_default = false; + g_main_context_pop_thread_default(d->ctx); + } + } + else { + if (!d->ctx_is_default) { + g_main_context_push_thread_default(d->ctx); + d->ctx_is_default = true; + } + } } \ No newline at end of file -- cgit v1.2.1 From f49d7e22b58dd3a6b9f1d5f8c87df80c6751eb8c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 13 Feb 2013 20:35:40 -0600 Subject: Automated update from Qt3 --- src/kernel/qeventloop_glib_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kernel/qeventloop_glib_p.h b/src/kernel/qeventloop_glib_p.h index 7c459ef88..225054bf2 100644 --- a/src/kernel/qeventloop_glib_p.h +++ b/src/kernel/qeventloop_glib_p.h @@ -90,6 +90,9 @@ public: xfd = -1; x_gPollFD.fd = -1; #endif // Q_WS_X11 + singletoolkit = TRUE; + ctx = 0; + ctx_is_default = false; reset(); } @@ -99,11 +102,8 @@ public: quitnow = FALSE; exitloop = FALSE; shortcut = FALSE; - singletoolkit = TRUE; - ctx = 0; - ctx_is_default = false; } - + int looplevel; int quitcode; unsigned int quitnow : 1; -- cgit v1.2.1 From 63d62f785ad636cb65f14aa52ce4dd9c177a6be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 17 Feb 2013 12:00:59 +0100 Subject: Fix unintended rename of LOCKFILE --- src/3rdparty/sqlite/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/sqlite/os.c b/src/3rdparty/sqlite/os.c index 1d91c354a..3130bdeeb 100644 --- a/src/3rdparty/sqlite/os.c +++ b/src/3rdparty/sqlite/os.c @@ -1340,7 +1340,7 @@ int sqliteOsReadLock(OsFile *id){ ovlp.Offset = FIRST_LOCKBYTE+1; ovlp.OffsetHigh = 0; ovlp.hEvent = 0; - res = LockFileEx(id->h, LOCTDEFILE_FAIL_IMMEDIATELY, + res = LockFileEx(id->h, LOCKFILE_FAIL_IMMEDIATELY, 0, N_LOCKBYTE, 0, &ovlp); }else{ res = LockFile(id->h, FIRST_LOCKBYTE+lk, 0, 1, 0); -- cgit v1.2.1 From cff522f98666e1bf24c36a3a0a2abe3fb2e1abe8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 18 Feb 2013 20:37:37 -0600 Subject: Automated update from Qt3 --- src/iconview/ntqiconview.h | 1 + src/iconview/qiconview.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++- src/kernel/qapplication.cpp | 2 +- src/kernel/qprocess_unix.cpp | 2 +- 4 files changed, 49 insertions(+), 3 deletions(-) diff --git a/src/iconview/ntqiconview.h b/src/iconview/ntqiconview.h index bda8273f4..e45cfca65 100644 --- a/src/iconview/ntqiconview.h +++ b/src/iconview/ntqiconview.h @@ -452,6 +452,7 @@ protected: void contentsDropEvent( TQDropEvent *e ); #endif + void bufferedPaintEvent( TQPaintEvent* ); void resizeEvent( TQResizeEvent* e ); void keyPressEvent( TQKeyEvent *e ); void focusInEvent( TQFocusEvent *e ); diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp index ee4a0fe36..dbf764a0f 100644 --- a/src/iconview/qiconview.cpp +++ b/src/iconview/qiconview.cpp @@ -214,6 +214,7 @@ public: TQIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor, *renamingItem; TQRect *rubber; + TQPixmap *backBuffer; TQTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, *fullRedrawTimer; int rastX, rastY, spacing; @@ -2800,6 +2801,7 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f ) d->currentItem = 0; d->highlightedItem = 0; d->rubber = 0; + d->backBuffer = 0; d->scrollTimer = 0; d->startDragItem = 0; d->tmpCurrentItem = 0; @@ -2953,6 +2955,8 @@ TQIconView::~TQIconView() delete item; item = tmp; } + delete d->backBuffer; + d->backBuffer = 0; delete d->fm; d->fm = 0; #ifndef QT_NO_TOOLTIP @@ -4972,6 +4976,47 @@ void TQIconView::contentsDropEvent( TQDropEvent *e ) } #endif +/*! + This function grabs all paintevents that otherwise would have been + processed by the TQScrollView::viewportPaintEvent(). Here we use a + doublebuffer to reduce 'on-paint' flickering on TQIconView + (and of course its children). + + \sa TQScrollView::viewportPaintEvent(), TQIconView::drawContents() +*/ + +void TQIconView::bufferedPaintEvent( TQPaintEvent* pe ) +{ + TQWidget* vp = viewport(); + TQRect r = pe->rect() & vp->rect(); + int ex = r.x() + contentsX(); + int ey = r.y() + contentsY(); + int ew = r.width(); + int eh = r.height(); + + if ( !d->backBuffer ) + d->backBuffer = new TQPixmap(vp->size()); + if ( d->backBuffer->size() != vp->size() ) { + // Resize function (with hysteresis). Uses a good compromise between memory + // consumption and speed (number) of resizes. + float newWidth = (float)vp->width(); + float newHeight = (float)vp->height(); + if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) + { + newWidth *= 1.1892; + newHeight *= 1.1892; + d->backBuffer->resize( (int)newWidth, (int)newHeight ); + } else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) + d->backBuffer->resize( (int)newWidth, (int)newHeight ); + } + + TQPainter p; + p.begin(d->backBuffer, vp); + drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh); + p.end(); + bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh); +} + /*! \reimp */ @@ -5756,7 +5801,7 @@ bool TQIconView::eventFilter( TQObject * o, TQEvent * e ) if ( !d->rubber ) drawDragShapes( d->oldDragPos ); } - viewportPaintEvent( (TQPaintEvent*)e ); + bufferedPaintEvent( (TQPaintEvent*)e ); if ( d->dragging ) { if ( !d->rubber ) drawDragShapes( d->oldDragPos ); diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 7aefd35b8..76b265926 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -545,7 +545,7 @@ public: TQThreadInstance::setCurrentThread(this); // thread should be running and not finished for the lifetime - // of the application (even if QCoreApplication goes away) + // of the application (even if TQCoreApplication goes away) d->running = true; d->finished = false; d->eventLoop = NULL; diff --git a/src/kernel/qprocess_unix.cpp b/src/kernel/qprocess_unix.cpp index a18672473..39027459d 100644 --- a/src/kernel/qprocess_unix.cpp +++ b/src/kernel/qprocess_unix.cpp @@ -1135,7 +1135,7 @@ bool TQProcess::canReadLineStderr() const This function always returns immediately. The data you pass to writeToStdin() is copied into an internal memory buffer in TQProcess, and when control goes back to the event loop, TQProcess will - starting transferring data from this buffer to the running process. � + starting transferring data from this buffer to the running process.   Sometimes the data will be transferred in several payloads, depending on how much data is read at a time by the process itself. When TQProcess has transferred all the data from its memory buffer to the running process, it -- cgit v1.2.1 From 2d10fcbf891ee3a034f083ba67dc1a37cbeca387 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 24 Feb 2013 02:28:01 -0600 Subject: Automated update from Qt3 --- src/kernel/qapplication.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 76b265926..d67df12b0 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -2931,7 +2931,14 @@ int TQApplication::exec() */ void TQApplication::exit( int retcode ) { - tqApp->eventLoop()->exit( retcode ); + TQThread* thread = tqApp->guiThread(); + if (thread) { + if (thread->d) { + if (thread->d->eventLoop) { + thread->d->eventLoop->exit( retcode ); + } + } + } } /*! -- cgit v1.2.1 From cb6a50aa2564adf03b5ccd87b8ee0e68947d3a61 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Mar 2013 23:18:51 -0600 Subject: Automated update from Qt3 --- src/iconview/qiconview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iconview/qiconview.cpp b/src/iconview/qiconview.cpp index dbf764a0f..c1ba1ea34 100644 --- a/src/iconview/qiconview.cpp +++ b/src/iconview/qiconview.cpp @@ -5800,11 +5800,11 @@ bool TQIconView::eventFilter( TQObject * o, TQEvent * e ) if ( d->dragging ) { if ( !d->rubber ) drawDragShapes( d->oldDragPos ); - } - bufferedPaintEvent( (TQPaintEvent*)e ); - if ( d->dragging ) { + viewportPaintEvent( (TQPaintEvent*)e ); if ( !d->rubber ) drawDragShapes( d->oldDragPos ); + } else { + bufferedPaintEvent( (TQPaintEvent*)e ); } } return TRUE; -- cgit v1.2.1