diff options
Diffstat (limited to 'kdbg/exprwnd.h')
-rw-r--r-- | kdbg/exprwnd.h | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kdbg/exprwnd.h b/kdbg/exprwnd.h index 6281296..0c18b8f 100644 --- a/kdbg/exprwnd.h +++ b/kdbg/exprwnd.h @@ -7,19 +7,19 @@ #ifndef EXPRWND_H #define EXPRWND_H -#include "qlistview.h" -#include <qlineedit.h> -#include <qpixmap.h> +#include "ntqlistview.h" +#include <ntqlineedit.h> +#include <ntqpixmap.h> #include <list> class ProgramTypeTable; class TypeInfo; struct ExprValue; class ExprWnd; -class QStringList; +class TQStringList; /*! \brief a variable's value is the tree of sub-variables */ -class VarTree : public QListViewItem +class VarTree : public TQListViewItem { public: enum VarKind { VKsimple, VKpointer, VKstruct, VKarray, @@ -34,21 +34,21 @@ public: TypeInfo* m_type; //!< the type of struct if it could be derived int m_exprIndex; //!< used in struct value update bool m_exprIndexUseGuard; //!< ditto; if guard expr should be used - QString m_partialValue; //!< while struct value update is in progress + TQString m_partialValue; //!< while struct value update is in progress - VarTree(VarTree* parent, QListViewItem* after, ExprValue* v); - VarTree(ExprWnd* parent, QListViewItem* after, const QString& name); + VarTree(VarTree* parent, TQListViewItem* after, ExprValue* v); + VarTree(ExprWnd* parent, TQListViewItem* after, const TQString& name); virtual ~VarTree(); public: - virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); - QString computeExpr() const; + virtual void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); + TQString computeExpr() const; bool isToplevelExpr() const; /** is this element an ancestor of (or equal to) child? */ bool isAncestorEq(const VarTree* child) const; /** update the regular value; returns whether a repaint is necessary */ - bool updateValue(const QString& newValue); + bool updateValue(const TQString& newValue); /** update the "quick member" value; returns whether repaint is necessary */ - bool updateStructValue(const QString& newValue); + bool updateStructValue(const TQString& newValue); /** find out the type of this value using the child values */ void inferTypesOfChildren(ProgramTypeTable& typeTable); /** get the type from base class part */ @@ -56,17 +56,17 @@ public: /** returns whether the pointer is a wchar_t */ bool isWcharT() const; - QString getText() const { return text(0); } - void setText(const QString& t) { QListViewItem::setText(0, t); } - void setPixmap(const QPixmap& p) { QListViewItem::setPixmap(0, p); } - QString value() const { return m_baseValue; } - VarTree* firstChild() const { return static_cast<VarTree*>(QListViewItem::firstChild()); } - VarTree* nextSibling() const { return static_cast<VarTree*>(QListViewItem::nextSibling()); } + TQString getText() const { return text(0); } + void setText(const TQString& t) { TQListViewItem::setText(0, t); } + void setPixmap(const TQPixmap& p) { TQListViewItem::setPixmap(0, p); } + TQString value() const { return m_baseValue; } + VarTree* firstChild() const { return static_cast<VarTree*>(TQListViewItem::firstChild()); } + VarTree* nextSibling() const { return static_cast<VarTree*>(TQListViewItem::nextSibling()); } private: void updateValueText(); - QString m_baseValue; //!< The "normal value" that the driver reported - QString m_structValue; //!< The "quick member" value + TQString m_baseValue; //!< The "normal value" that the driver reported + TQString m_structValue; //!< The "quick member" value bool m_baseChanged : 1; bool m_structChanged : 1; }; @@ -76,15 +76,15 @@ private: */ struct ExprValue { - QString m_name; - QString m_value; + TQString m_name; + TQString m_value; VarTree::VarKind m_varKind; VarTree::NameKind m_nameKind; ExprValue* m_child; /* the first child expression */ ExprValue* m_next; /* the next sibling expression */ bool m_initiallyExpanded; - ExprValue(const QString& name, VarTree::NameKind kind); + ExprValue(const TQString& name, VarTree::NameKind kind); ~ExprValue(); void appendChild(ExprValue* newChild); @@ -92,7 +92,7 @@ struct ExprValue }; -class ValueEdit : public QLineEdit +class ValueEdit : public TQLineEdit { Q_OBJECT public: @@ -103,25 +103,25 @@ public: VarTree* m_item; bool m_finished; protected: - void keyPressEvent(QKeyEvent *e); - void focusOutEvent(QFocusEvent* ev); - void paintEvent(QPaintEvent* e); + void keyPressEvent(TQKeyEvent *e); + void focusOutEvent(TQFocusEvent* ev); + void paintEvent(TQPaintEvent* e); public slots: void slotSelectionChanged(); signals: - void done(VarTree*, const QString&); + void done(VarTree*, const TQString&); }; -class ExprWnd : public QListView +class ExprWnd : public TQListView { Q_OBJECT public: - ExprWnd(QWidget* parent, const QString& colHeader, const char* name); + ExprWnd(TQWidget* parent, const TQString& colHeader, const char* name); ~ExprWnd(); /** returns the list with the expressions at the topmost level */ - QStringList exprList() const; + TQStringList exprList() const; /** appends a copy of expr to the end of the tree at the topmost level; * returns a pointer to the inserted top-level item */ VarTree* insertExpr(ExprValue* expr, ProgramTypeTable& typeTable); @@ -133,11 +133,11 @@ public: /** updates only the value of the node */ void updateStructValue(VarTree* display); /** get a top-level expression by name */ - VarTree* topLevelExprByName(const QString& name) const; + VarTree* topLevelExprByName(const TQString& name) const; /** return a member of the struct that pointer \a v refers to */ - static VarTree* ptrMemberByName(VarTree* v, const QString& name); + static VarTree* ptrMemberByName(VarTree* v, const TQString& name); /** return a member of the struct \a v */ - static VarTree* memberByName(VarTree* v, const QString& name); + static VarTree* memberByName(VarTree* v, const TQString& name); /** removes an expression; must be on the topmost level*/ void removeExpr(VarTree* item); /** clears the list of pointers needing updates */ @@ -146,21 +146,21 @@ public: VarTree* nextUpdatePtr(); VarTree* nextUpdateType(); VarTree* nextUpdateStruct(); - void editValue(VarTree* item, const QString& text); + void editValue(VarTree* item, const TQString& text); /** tells whether the a value is currently edited */ bool isEditing() const; - VarTree* firstChild() const { return static_cast<VarTree*>(QListView::firstChild()); } - VarTree* currentItem() const { return static_cast<VarTree*>(QListView::currentItem()); } - VarTree* selectedItem() const { return static_cast<VarTree*>(QListView::selectedItem()); } + VarTree* firstChild() const { return static_cast<VarTree*>(TQListView::firstChild()); } + VarTree* currentItem() const { return static_cast<VarTree*>(TQListView::currentItem()); } + VarTree* selectedItem() const { return static_cast<VarTree*>(TQListView::selectedItem()); } protected: void updateExprRec(VarTree* display, ExprValue* newValues, ProgramTypeTable& typeTable); void replaceChildren(VarTree* display, ExprValue* newValues); void collectUnknownTypes(VarTree* item); void checkUnknownType(VarTree* item); - static QString formatWCharPointer(QString value); - QPixmap m_pixPointer; + static TQString formatWCharPointer(TQString value); + TQPixmap m_pixPointer; std::list<VarTree*> m_updatePtrs; //!< dereferenced pointers that need update std::list<VarTree*> m_updateType; //!< structs whose type must be determined @@ -174,7 +174,7 @@ protected: signals: void removingItem(VarTree*); - void editValueCommitted(VarTree*, const QString&); + void editValueCommitted(VarTree*, const TQString&); }; #endif // EXPRWND_H |