diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 17:46:47 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-26 17:54:28 +0100 |
commit | 77a8a8f9dfc9a5cbbb8113c4e9cff6cc99e17d9f (patch) | |
tree | 14435c2fcf5d00244011e39a587dcbd81bc6d4d6 /kplayer/kplayernodeview.h | |
parent | 172761c982ab8ecb67dce7840564af5e89486d68 (diff) | |
download | kplayer-77a8a8f9dfc9a5cbbb8113c4e9cff6cc99e17d9f.tar.gz kplayer-77a8a8f9dfc9a5cbbb8113c4e9cff6cc99e17d9f.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kplayer/kplayernodeview.h')
-rw-r--r-- | kplayer/kplayernodeview.h | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/kplayer/kplayernodeview.h b/kplayer/kplayernodeview.h index 3e80377..f718773 100644 --- a/kplayer/kplayernodeview.h +++ b/kplayer/kplayernodeview.h @@ -18,8 +18,8 @@ #include <kdialogbase.h> #include <klistview.h> -#include <qdockwindow.h> -#include <qvalidator.h> +#include <tqdockwindow.h> +#include <tqvalidator.h> #include "kplayeractionlist.h" #include "kplayernode.h" @@ -36,16 +36,16 @@ class KPlayerPlaylist; /**Node name validator. *@author kiriuja */ -class KPlayerNodeNameValidator : public QValidator +class KPlayerNodeNameValidator : public TQValidator { public: /** Constructor. References and stores the given container node. */ - KPlayerNodeNameValidator (KPlayerContainerNode* node, QObject* parent = 0, const char* name = 0); + KPlayerNodeNameValidator (KPlayerContainerNode* node, TQObject* parent = 0, const char* name = 0); /** Destructor. Releases the container node. */ virtual ~KPlayerNodeNameValidator(); /** Validates node name. */ - virtual QValidator::State validate (QString& input, int& position) const; + virtual TQValidator::State validate (TQString& input, int& position) const; protected: /** Container node. */ @@ -61,7 +61,7 @@ class KPlayerPropertiesDevice : public KPlayerPropertiesDevicePage public: /** Constructor. */ - KPlayerPropertiesDevice (QWidget* parent = 0, const char* name = 0); + KPlayerPropertiesDevice (TQWidget* parent = 0, const char* name = 0); /** Destructor. */ virtual ~KPlayerPropertiesDevice(); @@ -74,7 +74,7 @@ public: protected: /** Enables or disables the OK button. */ - virtual void pathChanged (const QString&); + virtual void pathChanged (const TQString&); /** Shows or hides channel list and file options. */ virtual void typeChanged (int); @@ -91,7 +91,7 @@ class KPlayerDeviceDialog : public KDialogBase public: /** Constructor. */ - KPlayerDeviceDialog (QWidget* parent = 0, const char* name = 0); + KPlayerDeviceDialog (TQWidget* parent = 0, const char* name = 0); /** Destructor. */ virtual ~KPlayerDeviceDialog(); @@ -128,7 +128,7 @@ public: { return m_node; } /** Returns the node of the given item. */ - KPlayerNode* nodeForItem (QListViewItem* item) const + KPlayerNode* nodeForItem (TQListViewItem* item) const { return ((KPlayerListViewItem*) item) -> node(); } /** Returns the node view. */ @@ -136,7 +136,7 @@ public: { return (KPlayerNodeView*) KListViewItem::listView(); } /** Returns icon name. */ - virtual QString icon (void) const; + virtual TQString icon (void) const; /** Returns whether the node has children. */ virtual bool hasChildren (void); @@ -148,11 +148,11 @@ public: void update (void); /** Updates the given field of the item. */ - void update (const QString& name); + void update (const TQString& name); protected: /** Compares two list items. */ - virtual int compare (QListViewItem* item, int column, bool ascending) const; + virtual int compare (TQListViewItem* item, int column, bool ascending) const; /** Finds the item corresponding to the given node. */ KPlayerListViewItem* itemForNode (KPlayerNode* node); @@ -215,7 +215,7 @@ public: virtual void terminate (void); /** Returns icon name. */ - virtual QString icon (void) const; + virtual TQString icon (void) const; /** Returns whether the node has children. */ virtual bool hasChildren (void); @@ -280,7 +280,7 @@ public: protected: /** Compares two list items. */ - virtual int compare (QListViewItem* item, int column, bool ascending) const; + virtual int compare (TQListViewItem* item, int column, bool ascending) const; /** Creates a new child item for the given node and inserts it after the given item. */ virtual KPlayerListViewItem* createChild (KPlayerListViewItem* after, KPlayerNode* node); @@ -308,25 +308,25 @@ public: /** Entry URL. */ KURL m_url; /** Entry name. */ - QString m_name; + TQString m_name; /** List of expanded items. */ KURL::List m_expanded; /** List of selected item containers. */ KURL::List m_selected; /** List of selected item IDs. */ - QStringList m_selected_ids; + TQStringList m_selected_ids; /** Current item container. */ KURL m_current; /** Current item ID. */ - QString m_current_id; + TQString m_current_id; /** Scrolling position. */ - QPoint m_position; + TQPoint m_position; }; /** History. * @author kiriuja */ -typedef QValueList<KPlayerHistoryEntry> KPlayerHistory; +typedef TQValueList<KPlayerHistoryEntry> KPlayerHistory; /**History action list. *@author kiriuja @@ -338,7 +338,7 @@ class KPlayerHistoryActionList : public KPlayerActionList public: /** Constructor. */ KPlayerHistoryActionList (KPlayerHistory& history, const KPlayerHistory::Iterator& current, - const QString& text, const QString& status, const QString& whatsthis, QObject* parent, const char* name); + const TQString& text, const TQString& status, const TQString& whatsthis, TQObject* parent, const char* name); /** Destructor. */ virtual ~KPlayerHistoryActionList(); @@ -368,7 +368,7 @@ class KPlayerNodeView : public KListView public: /** Sets up the node view widget. */ - KPlayerNodeView (QWidget* parent = 0, const char* name = 0); + KPlayerNodeView (TQWidget* parent = 0, const char* name = 0); /** Frees up resources. */ virtual ~KPlayerNodeView(); @@ -389,7 +389,7 @@ public: int attributeCount (void) const { return m_attribute_names.count(); } /** Returns the list of attribute names. */ - const QStringList& attributeNames (void) const + const TQStringList& attributeNames (void) const { return m_attribute_names; } /** Returns the library widget. */ @@ -419,7 +419,7 @@ public: void setRootNode (KPlayerContainerNode* node); /** Returns the node of the given item. */ - KPlayerNode* nodeForItem (QListViewItem* item) const + KPlayerNode* nodeForItem (TQListViewItem* item) const { return ((KPlayerListViewItem*) item) -> node(); } /** Returns the active node. */ @@ -436,9 +436,9 @@ public: { return m_moving; } /** Stops editing an item that is going to be removed. */ - void itemTerminating (QListViewItem* item); + void itemTerminating (TQListViewItem* item); /** Changes the current item if the current one is among the children of item. */ - void keepUpCurrentItem (QListViewItem* current, QListViewItem* item); + void keepUpCurrentItem (TQListViewItem* current, TQListViewItem* item); /** Returns the playlist object. */ KPlayerPlaylist* playlist (void); @@ -447,7 +447,7 @@ public: KAction* action (const char* name) const; /** Checks whether the current item is being hidden and sets a new one. */ - virtual void setOpen (QListViewItem* item, bool open); + virtual void setOpen (TQListViewItem* item, bool open); /** Sets column width and moves the edit box if any. */ virtual void setColumnWidth (int column, int width); @@ -459,7 +459,7 @@ public: virtual void updateActions (void) = 0; /** Start editing the given column of the given item. */ - void startEditing (QListViewItem* item, int column); + void startEditing (TQListViewItem* item, int column); /** Terminates editing the current item. */ void stopEditing (bool save = true, int state = 0); @@ -479,12 +479,12 @@ protected slots: void updated (KPlayerContainerNode* parent, KPlayerNode* node); /** Expands, collapses or drills down a group node. */ - void itemExecuted (QListViewItem* item); + void itemExecuted (TQListViewItem* item); /** Shows the context menu. */ - void showContextMenu (KListView*, QListViewItem*, const QPoint&); + void showContextMenu (KListView*, TQListViewItem*, const TQPoint&); /** Updates the edited field of the current item. */ - void edited (QListViewItem* item, const QString& value, int column); + void edited (TQListViewItem* item, const TQString& value, int column); /** Moves line edit according to the new column size. */ void moveLineEdit (int section, int from, int to); /** Arranges for the line edit to be moved according to the new content position. */ @@ -558,42 +558,42 @@ protected: virtual void activeItemChanged (void); /** Finds the place where the drop would occur. */ - void findDropTarget (const QPoint& pos, QListViewItem*& parent, QListViewItem*& after); + void findDropTarget (const TQPoint& pos, TQListViewItem*& parent, TQListViewItem*& after); /** Finds the place where the drop would occur. */ - virtual void findDrop (const QPoint& pos, QListViewItem*& parent, QListViewItem*& after); + virtual void findDrop (const TQPoint& pos, TQListViewItem*& parent, TQListViewItem*& after); /** Accepts node and URL drags. */ - virtual bool acceptDrag (QDropEvent*) const; + virtual bool acceptDrag (TQDropEvent*) const; /** Sets custom node order if necessary. */ virtual void setNodeOrder (KPlayerContainerNode* node); /** Handles the drop event. */ - virtual void contentsDropEvent (QDropEvent*); + virtual void contentsDropEvent (TQDropEvent*); /** Handles the drag move event. */ - virtual void contentsDragMoveEvent (QDragMoveEvent*); + virtual void contentsDragMoveEvent (TQDragMoveEvent*); /** Handles the drag enter event. */ - virtual void contentsDragEnterEvent (QDragEnterEvent*); + virtual void contentsDragEnterEvent (TQDragEnterEvent*); /** Handles the drag leave event. */ - virtual void contentsDragLeaveEvent (QDragLeaveEvent*); + virtual void contentsDragLeaveEvent (TQDragLeaveEvent*); /** Handles accel overrides. */ - virtual bool event (QEvent*); + virtual bool event (TQEvent*); /** Handles the return key. */ - virtual void keyPressEvent (QKeyEvent*); + virtual void keyPressEvent (TQKeyEvent*); /** Updates actions and connections when the view gets the focus. */ - virtual void focusInEvent (QFocusEvent* event); + virtual void focusInEvent (TQFocusEvent* event); /** Updates actions and connections when the view loses the focus. */ - virtual void focusOutEvent (QFocusEvent* event); + virtual void focusOutEvent (TQFocusEvent* event); /** Stores indicator of right mouse button press. */ - virtual void contentsMousePressEvent (QMouseEvent* e); + virtual void contentsMousePressEvent (TQMouseEvent* e); /** Stores the last active item. */ - virtual void contentsMouseReleaseEvent (QMouseEvent* e); + virtual void contentsMouseReleaseEvent (TQMouseEvent* e); /** Processes keyboard events for rename edit box. */ - virtual bool eventFilter (QObject* object, QEvent* event); + virtual bool eventFilter (TQObject* object, TQEvent* event); /** Adds the given nodes to a new playlist. */ KPlayerContainerNode* addToNewPlaylist (const KPlayerNodeList& list); @@ -616,7 +616,7 @@ protected: /** Last current node. */ KPlayerNode* m_last_node; /** Names of visible node attributes. */ - QStringList m_attribute_names; + TQStringList m_attribute_names; /** Indicates whether items are being moved within the view. */ bool m_moving; /** Indicates whether the view has focus. */ @@ -646,7 +646,7 @@ class KPlayerListView : public KPlayerNodeView public: /** Sets up the list view widget. */ - KPlayerListView (QWidget* parent = 0, const char* name = 0); + KPlayerListView (TQWidget* parent = 0, const char* name = 0); /** Frees up resources. */ virtual ~KPlayerListView(); @@ -659,19 +659,19 @@ public: virtual KPlayerNodeView* sibling (void) const; /** Returns the list of available attribute names. */ - const QStringList& availableAttributes (void) const + const TQStringList& availableAttributes (void) const { return m_available_attributes; } /** Returns the list of editable attribute names. */ - const QStringList& editableAttributes (void) const + const TQStringList& editableAttributes (void) const { return m_editable_attributes; } /** Returns the list of all possible attributes. */ - const QStringList& attributeOrder (void) const + const TQStringList& attributeOrder (void) const { return m_attribute_order; } /** Returns the attribute states. */ - const QMap<QString, bool>& attributeStates (void) const + const TQMap<TQString, bool>& attributeStates (void) const { return m_attribute_states; } /** Returns the attribute counts. */ @@ -681,7 +681,7 @@ public: /** Fills the given list with selected nodes. */ virtual KPlayerNodeList getSelectedNodes (void) const; /** Fills the given list with selected nodes under the given item. */ - void getSelectedNodes (QListViewItem* item, KPlayerNodeList& list) const; + void getSelectedNodes (TQListViewItem* item, KPlayerNodeList& list) const; /** Sets the sorting order. */ virtual void setSorting (int column, bool ascending = true); @@ -734,24 +734,24 @@ protected: virtual void disconnectNode (void); /** Inserts an attribute into the list according to the order. */ - void insertAttribute (QStringList& list, const QString& name); + void insertAttribute (TQStringList& list, const TQString& name); /** Adds and sets up the column with the given name. */ - int setupColumn (const QString& name); + int setupColumn (const TQString& name); /** Loads and applies column the given column width. */ void loadColumnWidth (int index); /** Adjusts the last column width. */ //void adjustLastColumn (void); /** Removes and cleans up the column with the given name. */ - void cleanupColumn (const QString& name); + void cleanupColumn (const TQString& name); /** Returns whether the column with the given name has to be shown. */ - bool showColumn (const QString& name) const + bool showColumn (const TQString& name) const { return m_column_states.contains (name) && m_column_states [name]; } /** Adjusts the last column when contents are resized. */ //virtual void resizeContents (int width, int height); /** Adjusts the last column when viewport is resized. */ - //virtual void viewportResizeEvent (QResizeEvent*); + //virtual void viewportResizeEvent (TQResizeEvent*); /** Updates the given item as necessary. */ virtual void update (KPlayerListViewItem* item); @@ -759,15 +759,15 @@ protected: /** Counts of visible node attributes. */ KPlayerPropertyCounts m_attribute_counts; /** Names of available node attributes. */ - QStringList m_available_attributes; + TQStringList m_available_attributes; /** Names of editable node attributes. */ - QStringList m_editable_attributes; + TQStringList m_editable_attributes; /** Names of all possible node attributes. */ - QStringList m_attribute_order; + TQStringList m_attribute_order; /** Attribute states. */ - QMap<QString, bool> m_attribute_states; + TQMap<TQString, bool> m_attribute_states; /** Column states. */ - QMap<QString, bool> m_column_states; + TQMap<TQString, bool> m_column_states; /** Home media. */ KPlayerGenericProperties* m_home_media; }; @@ -781,7 +781,7 @@ class KPlayerTreeView : public KPlayerNodeView public: /** Sets up the tree view widget. */ - KPlayerTreeView (QWidget* parent = 0, const char* name = 0); + KPlayerTreeView (TQWidget* parent = 0, const char* name = 0); /** Frees up resources. */ virtual ~KPlayerTreeView(); @@ -810,7 +810,7 @@ public: { return m_current; } /** Adjusts column width. */ - virtual void setOpen (QListViewItem* item, bool open); + virtual void setOpen (TQListViewItem* item, bool open); /** Updates actions according to the current tree view selection. */ virtual void updateActions (void); @@ -856,7 +856,7 @@ protected: virtual KPlayerNodeList getSelectedNodes (void) const; /** Prevents KListView from resetting the alternate background. */ - virtual bool event (QEvent*); + virtual bool event (TQEvent*); /** Sets custom node order by name. */ virtual void setNodeOrder (KPlayerContainerNode* node); @@ -872,18 +872,18 @@ protected: /**The library splitter widget. *@author kiriuja */ -class KPlayerLibrary : public QSplitter +class KPlayerLibrary : public TQSplitter { Q_OBJECT public: /** Sets up the view widget. Adds tree and list children. */ - KPlayerLibrary (KActionCollection* ac, QWidget* parent = 0, const char* name = 0); + KPlayerLibrary (KActionCollection* ac, TQWidget* parent = 0, const char* name = 0); /** Frees up resources. */ virtual ~KPlayerLibrary(); /** Initializes library. */ - void initialize (QPopupMenu* menu); + void initialize (TQPopupMenu* menu); /** Frees up resources. */ void terminate (void); @@ -895,7 +895,7 @@ public: { return m_list; } /** Returns the popup menu. */ - QPopupMenu* popupMenu (void) const + TQPopupMenu* popupMenu (void) const { return m_popup; } /** Configuration. */ @@ -941,14 +941,14 @@ public: void disconnectActions (void); /** Emits the enableActionGroup signal. */ - void emitEnableActionGroup (const QString& name, bool enable) + void emitEnableActionGroup (const TQString& name, bool enable) { emit enableActionGroup (name, enable); } signals: /** Emitted when the library needs to be shown. */ void makeVisible (void); /** Emitted when an action group is enabled or disabled. */ - void enableActionGroup (const QString& name, bool enable); + void enableActionGroup (const TQString& name, bool enable); public slots: /** Shows library and opens the given node. */ @@ -960,7 +960,7 @@ protected: /** Action collection. */ KActionCollection* m_ac; /** Popup menu. */ - QPopupMenu* m_popup; + TQPopupMenu* m_popup; /** Tree view. */ KPlayerTreeView* m_tree; /** List view. */ @@ -982,13 +982,13 @@ protected: /**The library window. *@author kiriuja */ -class KPlayerLibraryWindow : public QDockWindow +class KPlayerLibraryWindow : public TQDockWindow { Q_OBJECT public: /** Constructor. */ - KPlayerLibraryWindow (KActionCollection* ac, QWidget* parent, const char* name = 0); + KPlayerLibraryWindow (KActionCollection* ac, TQWidget* parent, const char* name = 0); /** Returns the library. */ KPlayerLibrary* library (void) @@ -999,7 +999,7 @@ public: protected: /** Emits the windowHidden signal. */ - virtual void hideEvent (QHideEvent*); + virtual void hideEvent (TQHideEvent*); signals: /** Emitted when the library window is hidden. */ |