summaryrefslogtreecommitdiff
path: root/libopie/ofileselector.h
Unidiff
Diffstat (limited to 'libopie/ofileselector.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector.h65
1 files changed, 49 insertions, 16 deletions
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h
index 405a3ce..3f53fa9 100644
--- a/libopie/ofileselector.h
+++ b/libopie/ofileselector.h
@@ -39,2 +39,3 @@
39#include <qpixmap.h> 39#include <qpixmap.h>
40#include <qstringlist.h>
40 41
@@ -54,2 +55,7 @@ class FileSelector;
54class QGridLayout; 55class QGridLayout;
56class QLineEdit;
57class QLabel;
58class QWidgetStack;
59class QHBoxLayout;
60class QVBoxLayout;
55 61
@@ -57,5 +63,5 @@ class OFileSelectorItem : public QListViewItem {
57 public: 63 public:
58 OFileSelectorItem(const QPixmap &pixmap, const QString &path, 64 OFileSelectorItem(QListView *view, const QPixmap &pixmap, const QString &path,
59 const QString &date, const QString &size, 65 const QString &date, const QString &size,
60 bool isDir=false ){ 66 bool isDir=false ): QListViewItem(view) {
61 setPixmap(0, pixmap ); 67 setPixmap(0, pixmap );
@@ -81,7 +87,10 @@ class OFileSelector : public QWidget {
81 enum Selector{NORMAL=1, EXTENDED }; 87 enum Selector{NORMAL=1, EXTENDED };
82 OFileSelector(int mode, const QString &dirName, const QString &fileName = Qtring::null, const QStringList mimetypes = QStringList() ); 88 OFileSelector(QWidget *wid, int mode, int selector, const QString &dirName, const QString &fileName = QString::null, const QStringList mimetypes = QStringList() );
83 bool showToolbar() const; 89
84 bool showPermissionBar() const; 90 bool showToolbar() const { return m_shTool; };
85 bool showLineEdit()const; 91 bool showPermissionBar() const { return m_shPerm; };
86 bool showChooser( )const; 92 bool showLineEdit()const { return m_shLne; };
93 bool showChooser( )const { return m_shChooser; };
94 bool showYesCancel()const { return m_shYesNo; };
95 void setShowYesCancel( bool show );
87 void setShowToolbar( bool show ); 96 void setShowToolbar( bool show );
@@ -94,6 +103,8 @@ class OFileSelector : public QWidget {
94 void setMode( int ); 103 void setMode( int );
95 int mode()const; 104 int mode()const { return m_mode; };
96 105 int selector()const { return m_selector; };
106 void setSelector( int );
97 QString selectedName( ); 107 QString selectedName( );
98 const DocLnk* selectedDocument()const; 108 const DocLnk* selectedDocument()const;
109 void updateLay();
99 110
@@ -109,8 +120,11 @@ class OFileSelector : public QWidget {
109 void cancel(); 120 void cancel();
110 protected: 121
122 protected slots:
111 void slotOk(); 123 void slotOk();
112 void slotCancel(); 124 void slotCancel();
113 125 void slotViewCheck(const QString & );
126 protected:
127 void init();
114 int m_mode, m_selector; 128 int m_mode, m_selector;
115 QComboBox *m_location; 129 QComboBox *m_location, *m_mimeCheck, *m_viewCheck;
116 QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel; 130 QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel;
@@ -118,8 +132,20 @@ class OFileSelector : public QWidget {
118 QListView *m_View; 132 QListView *m_View;
133 QCheckBox *m_checkPerm;
134
119 QString m_currentDir; 135 QString m_currentDir;
120 FileSelector *m_Select; 136 QString m_name;
137 QStringList m_mimetypes;
138
139 FileSelector *m_select;
121 QWidgetStack *m_stack; 140 QWidgetStack *m_stack;
122 QGridLayout *m_lay; 141 QVBoxLayout *m_lay;
123 QHBox *m_toolbar; 142 QGridLayout *m_Oselector;
124 QHBox *m_ok; 143
144 QHBoxLayout *m_boxToolbar;
145 QHBoxLayout *m_boxOk;
146 QHBoxLayout *m_boxName;
147 QHBoxLayout *m_boxView;
148
149 QLineEdit *m_edit;
150 QLabel *m_fnLabel;
125 bool m_shTool:1; 151 bool m_shTool:1;
@@ -128,2 +154,4 @@ class OFileSelector : public QWidget {
128 bool m_shChooser:1; 154 bool m_shChooser:1;
155 bool m_shYesNo:1;
156 bool m_boCheckPerm:1;
129 157
@@ -132,2 +160,7 @@ class OFileSelector : public QWidget {
132 private: 160 private:
161 void delItems();
162 void initializeName();
163 void initializeYes();
164 void initializeChooser();
165
133 class OFileSelectorPrivate; 166 class OFileSelectorPrivate;