summaryrefslogtreecommitdiffstats
path: root/kdat/ktreeview.h
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/ktreeview.h')
-rw-r--r--kdat/ktreeview.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h
index ad1fe6b..5c6b52b 100644
--- a/kdat/ktreeview.h
+++ b/kdat/ktreeview.h
@@ -23,13 +23,13 @@
#ifndef KDE_KTREE_VIEW_H
#define KDE_KTREE_VIEW_H
-#include <qpixmap.h> /* used in items */
-#include <qptrstack.h> /* used to specify tree paths */
-#include <qstring.h> /* used in items */
-#include <qgridview.h> /* base class for widget */
+#include <tqpixmap.h> /* used in items */
+#include <tqptrstack.h> /* used to specify tree paths */
+#include <tqstring.h> /* used in items */
+#include <tqgridview.h> /* base class for widget */
// use stack of strings to represent path information
-typedef QPtrStack<QString> KPath;
+typedef TQPtrStack<TQString> KPath;
class KTreeView; /* forward declaration */
@@ -50,8 +50,8 @@ public:
* KTreeView::appendChildItem and KTreeView::insertChildItem that do
* not take a KTreeViewItem set the delete-children flag to true.)
*/
- KTreeViewItem(const QString& theText = QString()); // text can not be null when added to the list!
- KTreeViewItem(const QString& theText, const QPixmap& thePixmap);
+ 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
@@ -86,12 +86,12 @@ public:
/**
* Determines whether the specified point is inside the expand button.
*/
- bool expandButtonClicked(const QPoint& coord) const;
+ bool expandButtonClicked(const TQPoint& coord) const;
/**
* Give the item a chance to process the mouse event.
*/
- virtual bool mousePressEvent( const QPoint& coord );
+ virtual bool mousePressEvent( const TQPoint& coord );
/**
* Returns a pointer to the first child item in this item's sub tree, or
@@ -107,9 +107,9 @@ public:
/**
* Returns a reference to this item's pixmap. If there is no pixmap
* associated with this item, it will return a reference to a valid,
- * null QPixmap.
+ * null TQPixmap.
*/
- const QPixmap& getPixmap() const;
+ const TQPixmap& getPixmap() const;
/**
* Returns a pointer to the next item in the same branch below this
@@ -120,7 +120,7 @@ public:
/**
* Returns this item's text.
*/
- const QString& getText() const;
+ const TQString& getText() const;
/**
* Indicates whether this item has any children.
@@ -197,19 +197,19 @@ public:
* Sets the item pixmap to the given pixmap. It does not redraw the
* item or update the owning KTreeView.
*/
- void setPixmap(const QPixmap& pm);
+ void setPixmap(const TQPixmap& pm);
/**
* Sets the item text. This function does not redraw the item or update
* the owning KTreeView.
*/
- void setText(const QString& t);
+ void setText(const TQString& t);
protected:
/**
* Returns the bounding rectangle of the item.
*/
- virtual QRect boundingRect(int indent) const;
+ virtual TQRect boundingRect(int indent) const;
/**
* Returns the hieght of the item. The default implementation uses font
@@ -221,36 +221,36 @@ protected:
* Returns the height of the item depending on the passed-in font
* metrics.
*/
- virtual int height(const QFontMetrics& fm) const;
+ virtual int height(const TQFontMetrics& fm) const;
/**
* Paints the item: pixmap, text, expand button, parent branches
*/
- virtual void paint(QPainter* p, int indent,
- const QColorGroup& cg, bool highlighted) const;
+ virtual void paint(TQPainter* p, int indent,
+ const TQColorGroup& cg, bool highlighted) const;
/**
* paints the expand button
*/
- virtual void paintExpandButton(QPainter* p, int indent, int cellHeight) const;
+ virtual void paintExpandButton(TQPainter* p, int indent, int cellHeight) const;
/**
* paints the highlighted text
*/
- virtual void paintHighlight(QPainter* p, int indent,
- const QColorGroup& cg, bool hasFocus,
+ virtual void paintHighlight(TQPainter* p, int indent,
+ const TQColorGroup& cg, bool hasFocus,
Qt::GUIStyle style) const;
/**
* paints the item's text
*/
- virtual void paintText(QPainter* p, int indent, int cellHeight,
- const QColorGroup& cg, bool highlighted) const;
+ virtual void paintText(TQPainter* p, int indent, int cellHeight,
+ const TQColorGroup& cg, bool highlighted) const;
/**
* paints the item's tree part.
*/
- virtual void paintTree(QPainter* p, int indent, int cellHeight) const;
+ virtual void paintTree(TQPainter* p, int indent, int cellHeight) const;
/**
* Internal function that counts the number of child items.
@@ -260,7 +260,7 @@ protected:
/**
* Returns the bounding rectangle of the text.
*/
- virtual QRect textBoundingRect(int indent) const;
+ virtual TQRect textBoundingRect(int indent) const;
/**
* Returns the width of the item taking into account the specified
@@ -273,7 +273,7 @@ protected:
* Returns the width of the item depending on the passed-in font
* metrics and taking into account the specified indentation.
*/
- virtual int width(int indent, const QFontMetrics& fm) const;
+ virtual int width(int indent, const TQFontMetrics& fm) const;
protected:
/** The KTreeView that this item belongs to */
@@ -284,12 +284,12 @@ protected:
bool delayedExpanding;
bool doTree;
bool doText;
- mutable QRect expandButton; /* is set in paint() */
+ mutable TQRect expandButton; /* is set in paint() */
KTreeViewItem* child;
KTreeViewItem* parent;
KTreeViewItem* sibling;
- QPixmap pixmap;
- QString text;
+ TQPixmap pixmap;
+ TQString text;
bool deleteChildren;
};
@@ -406,7 +406,7 @@ public:
* current item to -1, and sets default values for scroll bars (both
* auto).
*/
- KTreeView(QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ KTreeView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
/*
* Desctructor. Deletes all items from the topmost level that have been
@@ -420,13 +420,13 @@ public:
* children. A KTreeViewItem is created for which the delete-children
* flag is set to true.
*/
- void appendChildItem(const QString & theText, const QPixmap& thePixmap,
+ void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
int index);
/**
* Same as above except that the parent item is specified by a path.
*/
- void appendChildItem(const QString & theText, const QPixmap& thePixmap,
+ void appendChildItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath);
/**
@@ -473,16 +473,16 @@ public:
enabled. If changing only the text or pixmap, set the other parameter
to 0.
*/
- void changeItem(const QString & newText,
- const QPixmap *newPixmap,
+ void changeItem(const TQString & newText,
+ const TQPixmap *newPixmap,
int index);
/**
Same as above function, except item to change is specified by a path
through the tree.
*/
- void changeItem(const QString & newText,
- const QPixmap *newPixmap,
+ void changeItem(const TQString & newText,
+ const TQPixmap *newPixmap,
const KPath& thePath);
/**
@@ -570,7 +570,7 @@ public:
* delete-children flag is set to true. Returns true if the item has
* been successfully inserted in the tree, otherwise false.
*/
- bool insertItem(const QString & theText, const QPixmap& thePixmap,
+ bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
int row = -1, bool prefix = true);
/**
@@ -578,7 +578,7 @@ public:
* insert position. If there is no item at the specified path, the item
* is simply appended to the tree at the topmost level.
*/
- bool insertItem(const QString & theText, const QPixmap& thePixmap,
+ bool insertItem(const TQString & theText, const TQPixmap& thePixmap,
const KPath& thePath, bool prefix = true);
/**
@@ -780,7 +780,7 @@ signals:
void highlighted(int index);
void selected(int index);
- void popupMenu( int index, const QPoint& );
+ void popupMenu( int index, const TQPoint& );
protected:
/**
* Appends theChild to theParent as a new direct child. All internal
@@ -790,8 +790,8 @@ protected:
void appendChildItem(KTreeViewItem* theParent,
KTreeViewItem* theChild);
void changeItem(KTreeViewItem* toChange,
- int itemRow, const QString & newText,
- const QPixmap* newPixmap);
+ int itemRow, const TQString & newText,
+ const TQPixmap* newPixmap);
/**
* Collapses the specified subtree and updates the display. subRoot
* need not be visible.
@@ -807,7 +807,7 @@ protected:
*/
void expandSubTree(KTreeViewItem* subRoot);
void fixChildren(KTreeViewItem *parentItem);
- virtual void focusInEvent(QFocusEvent *e);
+ virtual void focusInEvent(TQFocusEvent *e);
void forEveryItem(KForEveryM func,
void *user);
void forEveryVisibleItem(KForEveryM func,
@@ -839,16 +839,16 @@ protected:
void itemPath(KTreeViewItem* item, KPath& path) const;
void join(KTreeViewItem *item);
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
int level(KTreeViewItem* item) const;
void lowerItem(KTreeViewItem *item);
- virtual void mouseDoubleClickEvent(QMouseEvent *e);
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
- virtual void paintCell(QPainter *p, int row, int col);
+ virtual void mouseDoubleClickEvent(TQMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void mouseReleaseEvent(TQMouseEvent *e);
+ virtual void paintCell(TQPainter *p, int row, int col);
/*
- * virtual void paintItem(QPainter *p, KTreeViewItem *item,
+ * virtual void paintItem(TQPainter *p, KTreeViewItem *item,
* bool highlighted);
*/
void raiseItem(KTreeViewItem* item);
@@ -887,13 +887,13 @@ protected:
// Rainer Bawidamann: move window in "rubberband" mode
bool rubberband_mode; // true if in "rubberband_mode"
- QPoint rubber_startMouse; // where the user pressed the MMB
+ TQPoint rubber_startMouse; // where the user pressed the MMB
int rubber_height, rubber_width, // the size if the rubberband rect
rubber_startX, rubber_startY; // the x/yOffset() when the MMB was pressed
void draw_rubberband();
- void start_rubberband(const QPoint& where);
+ void start_rubberband(const TQPoint& where);
void end_rubberband();
- void move_rubberband(const QPoint& where);
+ void move_rubberband(const TQPoint& where);
};
#endif // KDE_KTREE_VIEW_H