1 #ifndef QTX_DIRLISTEDITOR_H
2 #define QTX_DIRLISTEDITOR_H
7 #include <qtoolbutton.h>
10 #include <qcombobox.h>
13 #pragma warning( disable:4251 )
17 * \brief The GUI implementation of the directory list
19 class QTX_EXPORT QtxDirListEditor : public QWidget {
27 * \param parent - the parent of the widget
29 QtxDirListEditor(QWidget* parent);
37 * \brief Gets list of paths
38 * \param list - the returned reference to the list of paths
40 void getPathList(QStringList& list);
43 * \brief Sets list of paths
44 * \param list - the list of paths to set
46 void setPathList(const QStringList& list);
49 * \brief Event filter, redefined from QObject class
51 bool eventFilter(QObject* object, QEvent* event);
56 * \brief Validates entered path
57 * \retval bool - returns status (true if OK)
62 * \brief Appends/changes path
63 * \param item - the item in QListBox
64 * \param dir - the path
66 void appendDir(QListBoxItem* item, const QString& dir);
69 * \brief Removes directory from list
70 * \param item - the item in QListBox
72 void removeDir(QListBoxItem* item);
75 * \brief Resize event handler, reimplemented from QWidget
76 * \param event - the resize event
78 void resizeEvent(QResizeEvent* event);
83 * \brief Called when user clicks inside directories list box
85 void onMouseButtonClicked(int, QListBoxItem*, const QPoint&);
88 * \brief Called when user double-clicks on any item
90 void onDblClicked(QListBoxItem*);
93 * \brief <...> (Browse dir) button slot
98 * \brief Ccalled when user finises editing of path by pressing <Enter>
100 void onEditFinished();
103 * \brief <Insert> button slot
108 * \brief <Delete> button slot
113 * \brief <Move up> button slot
118 * \brief <Move down> button slot
123 QListBox* myDirList; //!< directory list
124 QLineEdit* myEdit; //!< path edit box
125 QToolButton* myBtn; //!< browse pah button
126 bool myEdited; //!< edit mode flag
127 QListBoxItem* myLastSelected; //!< last selected row