diff options
Diffstat (limited to 'krecipes/src/widgets/categorylistview.h')
-rw-r--r-- | krecipes/src/widgets/categorylistview.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/krecipes/src/widgets/categorylistview.h b/krecipes/src/widgets/categorylistview.h index 6b894a5..630653a 100644 --- a/krecipes/src/widgets/categorylistview.h +++ b/krecipes/src/widgets/categorylistview.h @@ -12,8 +12,8 @@ #ifndef CATEGORYLISTVIEW_H #define CATEGORYLISTVIEW_H -#include <qmap.h> -#include <qpixmap.h> +#include <ntqmap.h> +#include <ntqpixmap.h> #include "dblistviewbase.h" @@ -47,7 +47,7 @@ public: { return ctyStored.id; } - QString categoryName() const + TQString categoryName() const { return ctyStored.name; } @@ -59,15 +59,15 @@ private: bool populated; }; -class CategoryCheckListItem : public QCheckListItem, public CategoryItemInfo +class CategoryCheckListItem : public TQCheckListItem, public CategoryItemInfo { public: CategoryCheckListItem( CategoryCheckListView* klv, const Element &category, bool exclusive = true ); - CategoryCheckListItem( QListViewItem* it, const Element &category, bool exclusive = true ); - CategoryCheckListItem( CategoryCheckListView* klv, QListViewItem* it, const Element &category, bool exclusive = true ); + CategoryCheckListItem( TQListViewItem* it, const Element &category, bool exclusive = true ); + CategoryCheckListItem( CategoryCheckListView* klv, TQListViewItem* it, const Element &category, bool exclusive = true ); - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); int rtti() const { @@ -87,15 +87,15 @@ private: }; -class CategoryListItem : public QListViewItem, public CategoryItemInfo +class CategoryListItem : public TQListViewItem, public CategoryItemInfo { public: - CategoryListItem( QListView* klv, const Element &category ); - CategoryListItem( QListViewItem* it, const Element &category ); - CategoryListItem( QListView* klv, QListViewItem* it, const Element &category ); + CategoryListItem( TQListView* klv, const Element &category ); + CategoryListItem( TQListViewItem* it, const Element &category ); + CategoryListItem( TQListView* klv, TQListViewItem* it, const Element &category ); - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); int rtti() const { @@ -110,12 +110,12 @@ class CategoryListView : public DBListViewBase Q_OBJECT public: - CategoryListView( QWidget *parent, RecipeDB * ); + CategoryListView( TQWidget *parent, RecipeDB * ); - void populateAll( QListViewItem *parent = 0 ); + void populateAll( TQListViewItem *parent = 0 ); public slots: - void open( QListViewItem *item ); + void open( TQListViewItem *item ); protected: virtual void init(); @@ -126,14 +126,14 @@ protected: * subchildren that aren't expandable. The code is taken from KDE's KListView with * one line commented out. */ - void findDrop( const QPoint &pos, QListViewItem *&parent, QListViewItem *&after ) + void findDrop( const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after ) { - QPoint p ( contentsToViewport( pos ) ); + TQPoint p ( contentsToViewport( pos ) ); // Get the position to put it in - QListViewItem *atpos = itemAt( p ); + TQListViewItem *atpos = itemAt( p ); - QListViewItem *above; + TQListViewItem *above; if ( !atpos ) // put it at the end above = lastItem(); else { @@ -170,8 +170,8 @@ protected: // Ok, there's one more level of complexity. We may want to become a new // sibling, but of an upper-level group, rather than the "above" item - QListViewItem * betterAbove = above->parent(); - QListViewItem * last = above; + TQListViewItem * betterAbove = above->parent(); + TQListViewItem * last = above; while ( betterAbove ) { // We are allowed to become a sibling of "betterAbove" only if we are // after its last child @@ -200,12 +200,12 @@ protected slots: virtual void mergeCategories( int id1, int id2 ); virtual void checkCreateCategory( const Element &, int parent_id ); - virtual void populate( QListViewItem *item ); + virtual void populate( TQListViewItem *item ); - QMap<int, QListViewItem*> items_map; + TQMap<int, TQListViewItem*> items_map; private: - QListViewItem *m_item_to_delete; + TQListViewItem *m_item_to_delete; }; @@ -214,18 +214,18 @@ class StdCategoryListView : public CategoryListView Q_OBJECT public: - StdCategoryListView( QWidget *parent, RecipeDB *, bool editable = false ); + StdCategoryListView( TQWidget *parent, RecipeDB *, bool editable = false ); ~StdCategoryListView(); protected: virtual void removeCategory( int id ); virtual void createCategory( const Element &category, int parent_id ); - void setPixmap( const QPixmap &pixmap ); + void setPixmap( const TQPixmap &pixmap ); private slots: void preparePopup(); - void showPopup( KListView *, QListViewItem *, const QPoint & ); + void showPopup( KListView *, TQListViewItem *, const TQPoint & ); void createNew(); void remove @@ -235,19 +235,19 @@ private slots: void paste(); void pasteAsSub(); - void changeCategoryParent( QListViewItem *item, QListViewItem * /*afterFirst*/, QListViewItem * /*afterNow*/ ); + void changeCategoryParent( TQListViewItem *item, TQListViewItem * /*afterFirst*/, TQListViewItem * /*afterNow*/ ); - void modCategory( QListViewItem* i ); - void saveCategory( QListViewItem* i ); + void modCategory( TQListViewItem* i ); + void saveCategory( TQListViewItem* i ); private: - bool checkBounds( const QString &name ); + bool checkBounds( const TQString &name ); KPopupMenu *kpop; - QListViewItem *clipboard_item; - QListViewItem *clipboard_parent; + TQListViewItem *clipboard_item; + TQListViewItem *clipboard_parent; - QPixmap m_folder_icon; + TQPixmap m_folder_icon; }; @@ -256,7 +256,7 @@ class CategoryCheckListView : public CategoryListView Q_OBJECT public: - CategoryCheckListView( QWidget *parent, RecipeDB *, bool exclusive=true, const ElementList &init_items_checked = ElementList() ); + CategoryCheckListView( TQWidget *parent, RecipeDB *, bool exclusive=true, const ElementList &init_items_checked = ElementList() ); virtual void stateChange( CategoryCheckListItem*, bool ); @@ -275,11 +275,11 @@ private: }; -class PseudoListItem : public QListViewItem +class PseudoListItem : public TQListViewItem { public: - PseudoListItem( QListView* lv ) : QListViewItem(lv){} - PseudoListItem( QListViewItem* it ) : QListViewItem(it){} + PseudoListItem( TQListView* lv ) : TQListViewItem(lv){} + PseudoListItem( TQListViewItem* it ) : TQListViewItem(it){} protected: int rtti() const { return PSEUDOLISTITEM_RTTI; } |