1 // File : QAD_DirListDlg.h
2 // Created : 10/10/2002
3 // Descr : Dialog box for editing of directory list
5 // Author : Vadim SANDLER
6 // Project : SALOME Pro
8 // Copyright : Open CASCADE
11 #if !defined(QAD_DirListDlg_h)
12 #define QAD_DirListDlg_h
15 #include <qtoolbutton.h>
16 #include <qlineedit.h>
18 #include <qcombobox.h>
20 class QAD_DirListDlg : public QDialog {
26 QAD_DirListDlg(QWidget* parent, const char* name = 0);
31 void getPathList(QStringList& list);
33 void setPathList(const QStringList& list);
35 bool eventFilter(QObject* object, QEvent* event);
38 // validates entered path, returns true if OK
40 // appends/changes path
41 void appendDir(QListBoxItem* item, const QString& dir);
42 // removes directory from list
43 void removeDir(QListBoxItem* item);
44 // KeyPress event handler, processes <Enter> and <Escape> keys
45 void keyPressEvent(QKeyEvent* event);
47 void resizeEvent(QResizeEvent* event);
50 // called when user clicks inside directories list box
51 void onMouseButtonClicked(int, QListBoxItem*, const QPoint&);
52 // called when user double-clicks on any item
53 void onDblClicked(QListBoxItem*);
54 // <...> (Browse dir) button slot
56 // called when user finises editing of path by pressing <Enter>
57 void onEditFinished();
58 // <Insert> button slot
60 // <Delete> button slot
62 // <Move up> button slot
64 // <Move down> button slot
70 QListBox* myDirList; // directory list
71 QLineEdit* myEdit; // path edit box
72 QToolButton* myBtn; // browse pah button
73 bool myEdited; // edit mode flag
74 QListBoxItem* myLastSelected; // last selected row
78 #endif // !defined(QAD_DirListDlg_h)