summaryrefslogtreecommitdiffstats
path: root/kdat/ktreeview.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/ktreeview.h')
-rw-r--r--kdat/ktreeview.h73
1 files changed, 37 insertions, 36 deletions
diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h
index 5c6b52b..724caf5 100644
--- a/kdat/ktreeview.h
+++ b/kdat/ktreeview.h
@@ -43,25 +43,25 @@ public:
* item can be constructed this way, the text has to be non-null when
* the item is added to the tree, or it will not be inserted.
*
- * The constructor sets the delete-children flag to false. This flag
+ * The constructor sets the delete-tqchildren flag to false. This flag
* tells the item whether it shall delete the child items when it is
* itself deleted. By default the creator of the item is responsible to
* also delete the child items. (However, the versions of
* KTreeView::appendChildItem and KTreeView::insertChildItem that do
- * not take a KTreeViewItem set the delete-children flag to true.)
+ * not take a KTreeViewItem set the delete-tqchildren flag to true.)
*/
KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list!
KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap);
/**
- * Destructor. It destroys its children if this item has been marked
+ * Destructor. It destroys its tqchildren if this item has been marked
* with setDeleteChildren(true).
*/
virtual ~KTreeViewItem();
/**
* Appends a new (direct) child item at the end. It does not update
- * administrative data in newChild except for its parent (which is this
+ * administrative data in newChild except for its tqparent (which is this
* item) and owner.
*/
void appendChild(KTreeViewItem* newChild);
@@ -70,7 +70,7 @@ public:
* Returns a pointer to the child item at the given index in this
* item's sub tree, or 0 if not found.
*/
- KTreeViewItem* childAt(int index) const;
+ KTreeViewItem* tqchildAt(int index) const;
/**
* Returns the number of child items in this item's sub tree.
@@ -100,7 +100,7 @@ public:
KTreeViewItem* getChild() const;
/**
- * Returns a pointer to the parent of this item, or 0 if none.
+ * Returns a pointer to the tqparent of this item, or 0 if none.
*/
KTreeViewItem* getParent() const;
@@ -123,12 +123,12 @@ public:
const TQString& getText() const;
/**
- * Indicates whether this item has any children.
+ * Indicates whether this item has any tqchildren.
*/
bool hasChild() const;
/**
- * Indicates whether this item has a parent.
+ * Indicates whether this item has a tqparent.
*/
bool hasParent() const;
@@ -142,7 +142,7 @@ public:
* Inserts the a new (direct) child in this item before the child at
* the specified index (first child is index 0). If there is no child
* at the specified index, the item is appended. It does not update
- * administrative data in newChild except for its parent (which is this
+ * administrative data in newChild except for its tqparent (which is this
* item) and owner.
*/
void insertChild(int index, KTreeViewItem* newChild);
@@ -152,7 +152,7 @@ public:
* items (if any) would be visible if this item were visible.
*
* Note: If this function returns true, it does not necessarily indicate that
- * this item is visible or that this item has any children.
+ * this item is visible or that this item has any tqchildren.
*/
bool isExpanded() const;
@@ -174,12 +174,12 @@ public:
* Sets the delayed-expanding flag. If this flag is true, the expanding
* signal is emitted when the item is about to be expanded. The expand
* button is always painted for this item, even if it doesn't have
- * children.
+ * tqchildren.
*/
void setDelayedExpanding(bool flag);
/**
- * Tells the item whether it should delete its children when it is
+ * Tells the item whether it should delete its tqchildren when it is
* deleted. The default is false, which means that the child items must
* be deleted explicitly.
*/
@@ -224,7 +224,7 @@ protected:
virtual int height(const TQFontMetrics& fm) const;
/**
- * Paints the item: pixmap, text, expand button, parent branches
+ * Paints the item: pixmap, text, expand button, tqparent branches
*/
virtual void paint(TQPainter* p, int indent,
const TQColorGroup& cg, bool highlighted) const;
@@ -239,7 +239,7 @@ protected:
*/
virtual void paintHighlight(TQPainter* p, int indent,
const TQColorGroup& cg, bool hasFocus,
- Qt::GUIStyle style) const;
+ TQt::GUIStyle style) const;
/**
* paints the item's text
@@ -286,7 +286,7 @@ protected:
bool doText;
mutable TQRect expandButton; /* is set in paint() */
KTreeViewItem* child;
- KTreeViewItem* parent;
+ KTreeViewItem* tqparent;
KTreeViewItem* sibling;
TQPixmap pixmap;
TQString text;
@@ -310,7 +310,7 @@ typedef bool (*KForEvery)
1. Introduction
================================================================================
- KTreeView is a class inherited from QTableView in the Qt user interface
+ KTreeView is a class inherited from TQTableView in the TQt user interface
library. It provides a way to display hierarchical data in a single-inheritance
tree, similar to tree controls in Microsoft Windows and other GUI's. It is most
suitable for directory trees or outlines, but I'm sure other uses will come to
@@ -331,7 +331,7 @@ typedef bool (*KForEvery)
by the programmer.
* The list items can be returned by index or logical path and the tree
- navigated by parent, child or sibling references contained in them. Also,
+ navigated by tqparent, child or sibling references contained in them. Also,
item information such as text, pixmap, branch level can be obtained.
* Items can be inserted, changed and removed either by index in the visible
@@ -395,18 +395,19 @@ typedef bool (*KForEvery)
signal void collpased(int) - emitted when an item in the tree is collapsed;
sends the index of the item
*/
-class KTreeView : public QGridView
+class KTreeView : public TQGridView
{
friend class KTreeViewItem;
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * Widget contructor. Passes all parameters on to base QTableView, and
+ * Widget contructor. Passes all parameters on to base TQTableView, and
* does not use them directly. Does internal initialization, sets the
* current item to -1, and sets default values for scroll bars (both
* auto).
*/
- KTreeView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ KTreeView(TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0);
/*
* Desctructor. Deletes all items from the topmost level that have been
@@ -416,28 +417,28 @@ public:
/**
* Appends a new child item to the item at the specified row. If that
- * item already has children, the new item is appended below these
- * children. A KTreeViewItem is created for which the delete-children
+ * item already has tqchildren, the new item is appended below these
+ * tqchildren. A KTreeViewItem is created for which the delete-tqchildren
* flag is set to true.
*/
void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
int index);
/**
- * Same as above except that the parent item is specified by a path.
+ * Same as above except that the tqparent item is specified by a path.
*/
void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath);
/**
* Appendss the specified item as a child of the item that is at the
- * specified row. If that item already has children, the new item is
- * appended below these children.
+ * specified row. If that item already has tqchildren, the new item is
+ * appended below these tqchildren.
*/
void appendChildItem(KTreeViewItem* newItem, int index);
/**
- * Same as above except that the parent item is specified by a path.
+ * Same as above except that the tqparent item is specified by a path.
*/
void appendChildItem(KTreeViewItem* newItem, const KPath& thePath);
@@ -514,7 +515,7 @@ public:
void expandItem(int index);
/**
- Returns the depth to which all parent items are automatically
+ Returns the depth to which all tqparent items are automatically
expanded.
*/
int expandLevel() const;
@@ -528,7 +529,7 @@ public:
/**
* Iterates every item in the tree, visible or not, and applies the
* function func with a pointer to each item and user data supplied as
- * parameters. The children of the specified root item are visited
+ * parameters. The tqchildren of the specified root item are visited
* (root itself is not visited!). If root is 0 all items in the tree
* are visited. KForEveryFunc is defined as:
*
@@ -567,7 +568,7 @@ public:
* the value of prefix. The new item is added to the same branch as the
* referenced item. If row is -1, the item is simply appended to the
* tree at the topmost level. A KTreeViewItem is created for which the
- * delete-children flag is set to true. Returns true if the item has
+ * delete-tqchildren flag is set to true. Returns true if the item has
* been successfully inserted in the tree, otherwise false.
*/
bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
@@ -621,7 +622,7 @@ public:
/**
* Outdents the item at the given row one level so that it becomes a
- * sibling of its parent.
+ * sibling of its tqparent.
*/
void join(int index);
@@ -755,7 +756,7 @@ public:
/**
* This function is deprecated. Use numRows() instead.
- * Returns the number of items that are visible (their parents are
+ * Returns the number of items that are visible (their tqparents are
* expanded).
*/
int visibleCount() const { return numRows(); }
@@ -784,7 +785,7 @@ signals:
protected:
/**
* Appends theChild to theParent as a new direct child. All internal
- * state is updated and the widget is repainted as necessary. theChild
+ * state is updated and the widget is tqrepainted as necessary. theChild
* remains invisible if any ancestor of theParent is collapsed.
*/
void appendChildItem(KTreeViewItem* theParent,
@@ -800,13 +801,13 @@ protected:
/** Internal function used for counting items */
bool countItem(KTreeViewItem* item, void* total);
- void expandOrCollapse(KTreeViewItem *parentItem);
+ void expandOrCollapse(KTreeViewItem *tqparentItem);
/**
* Expands the specified subtree and updates the display. subRoot need
* not be visible.
*/
void expandSubTree(KTreeViewItem* subRoot);
- void fixChildren(KTreeViewItem *parentItem);
+ void fixChildren(KTreeViewItem *tqparentItem);
virtual void focusInEvent(TQFocusEvent *e);
void forEveryItem(KForEveryM func,
void *user);
@@ -827,7 +828,7 @@ protected:
* topmost level. If referenceItem is not 0, it must be an item that is
* already in the KTreeView. Internal data is updated and the display
* is refreshed as necessary. The inserted item may still be invisible
- * if any of the parents is collapsed. newItem must not be 0.
+ * if any of the tqparents is collapsed. newItem must not be 0.
*/
bool insertItem(KTreeViewItem* referenceItem, KTreeViewItem* newItem,
bool prefix);
@@ -869,7 +870,7 @@ public:
protected:
virtual void updateCellWidth();
virtual void updateVisibleItems();
- void updateVisibleItemRec(KTreeViewItem* parent, int& count, int& width);
+ void updateVisibleItemRec(KTreeViewItem* tqparent, int& count, int& width);
KTreeViewItem* treeRoot;
bool clearing;