author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/ofileselector_p.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/ofileselector_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/ofileselector_p.h b/microkde/ofileselector_p.h index 834fd70..a7d97fe 100644 --- a/microkde/ofileselector_p.h +++ b/microkde/ofileselector_p.h | |||
@@ -76,129 +76,129 @@ public: | |||
76 | QString selectedPath() const; | 76 | QString selectedPath() const; |
77 | 77 | ||
78 | QString directory() const; | 78 | QString directory() const; |
79 | void reread(); | 79 | void reread(); |
80 | int fileCount()const; | 80 | int fileCount()const; |
81 | DocLnk selectedDocument()const; | 81 | DocLnk selectedDocument()const; |
82 | 82 | ||
83 | QWidget* widget( QWidget* parent ); | 83 | QWidget* widget( QWidget* parent ); |
84 | 84 | ||
85 | private: | 85 | private: |
86 | mutable FileSelector* m_selector; | 86 | mutable FileSelector* m_selector; |
87 | 87 | ||
88 | }; | 88 | }; |
89 | 89 | ||
90 | class OFileSelectorItem : public QListViewItem { | 90 | class OFileSelectorItem : public QListViewItem { |
91 | public: | 91 | public: |
92 | OFileSelectorItem( QListView* view, const QPixmap& pixmap, | 92 | OFileSelectorItem( QListView* view, const QPixmap& pixmap, |
93 | const QString& path, const QString& date, | 93 | const QString& path, const QString& date, |
94 | const QString& size, const QString& mDir, | 94 | const QString& size, const QString& mDir, |
95 | bool isLocked = false, bool isDir = false ); | 95 | bool isLocked = false, bool isDir = false ); |
96 | ~OFileSelectorItem(); | 96 | ~OFileSelectorItem(); |
97 | bool isLocked()const; | 97 | bool isLocked()const; |
98 | bool isDir()const; | 98 | bool isDir()const; |
99 | QString directory()const; | 99 | QString directory()const; |
100 | QString path()const; | 100 | QString path()const; |
101 | QString key(int id, bool )const; | 101 | QString key(int id, bool )const; |
102 | 102 | ||
103 | private: | 103 | private: |
104 | bool m_locked : 1; | 104 | bool m_locked : 1; |
105 | bool m_isDir : 1; | 105 | bool m_isDir : 1; |
106 | QString m_dir; | 106 | QString m_dir; |
107 | }; | 107 | }; |
108 | 108 | ||
109 | class OFileViewFileListView : public QWidget { | 109 | class OFileViewFileListView : public QWidget { |
110 | Q_OBJECT | 110 | Q_OBJECT |
111 | public: | 111 | public: |
112 | OFileViewFileListView( QWidget* parent, const QString& dir, OFileSelector* selector ); | 112 | OFileViewFileListView( QWidget* parent, const QString& dir, OFileSelector* selector ); |
113 | ~OFileViewFileListView(); | 113 | ~OFileViewFileListView(); |
114 | 114 | ||
115 | OFileSelectorItem* currentItem()const; | 115 | OFileSelectorItem* currentItem()const; |
116 | void reread( bool all = false ); | 116 | void reread( bool all = false ); |
117 | int fileCount()const; | 117 | int fileCount()const; |
118 | QString currentDir()const; | 118 | QString currentDir()const; |
119 | protected: | 119 | protected: |
120 | bool eventFilter (QObject *o, QEvent *e); | 120 | bool eventFilter (QObject *o, QEvent *e); |
121 | private slots: | 121 | private slots: |
122 | void slotNew(); // will emit newSelected | 122 | void slotNew(); // will emit newSelected |
123 | void cdUP(); | 123 | void cdUP(); |
124 | void cdHome(); | 124 | void cdHome(); |
125 | void cdDoc(); | 125 | void cdDoc(); |
126 | void changeDir( const QString& ); | 126 | void changeDir( const QString& ); |
127 | void slotCurrentChanged( QListViewItem* ); | 127 | void slotCurrentChanged( QListViewItem* ); |
128 | void slotClicked(int, QListViewItem*, const QPoint&, int ); | 128 | void slotClicked(int, QListViewItem*, const QPoint&, int ); |
129 | void slotDoubleClicked(QListViewItem*); | 129 | void slotDoubleClicked(QListViewItem*); |
130 | void slotFSActivated(int); | 130 | void slotFSActivated(int); |
131 | 131 | ||
132 | protected: | 132 | protected: |
133 | 133 | ||
134 | OFileSelector* selector(); | 134 | OFileSelector* selector(); |
135 | 135 | ||
136 | private: | 136 | private: |
137 | QMap<QString, QString> m_dev; | 137 | QMap<QString, QString> m_dev; |
138 | bool m_all : 1; | 138 | bool m_all : 1; |
139 | OFileSelector* m_sel; | 139 | OFileSelector* m_sel; |
140 | QPopupMenu* m_fsPop; | 140 | Q3PopupMenu* m_fsPop; |
141 | bool compliesMime( const QString& ); | 141 | bool compliesMime( const QString& ); |
142 | QStringList m_mimes; // used in compy mime | 142 | QStringList m_mimes; // used in compy mime |
143 | QString m_currentDir; | 143 | QString m_currentDir; |
144 | QToolButton *m_btnNew, *m_btnClose; | 144 | QToolButton *m_btnNew, *m_btnClose; |
145 | void connectSlots(); | 145 | void connectSlots(); |
146 | void addFile( QFileInfo* info, bool symlink = FALSE ); | 146 | void addFile( QFileInfo* info, bool symlink = FALSE ); |
147 | void addDir ( QFileInfo* info, bool symlink = FALSE ); | 147 | void addDir ( QFileInfo* info, bool symlink = FALSE ); |
148 | void addSymlink( QFileInfo* info, bool = FALSE ); | 148 | void addSymlink( QFileInfo* info, bool = FALSE ); |
149 | 149 | ||
150 | 150 | ||
151 | private: | 151 | private: |
152 | QListView* m_view; | 152 | QListView* m_view; |
153 | }; | 153 | }; |
154 | 154 | ||
155 | typedef QMap<QString, QStringList> MimeTypes; | 155 | typedef QMap<QString, QStringList> MimeTypes; |
156 | 156 | ||
157 | class OFileViewInterface; | 157 | class OFileViewInterface; |
158 | class OFileViewFileListView; | 158 | class OFileViewFileListView; |
159 | class QLineEdit; | 159 | class QLineEdit; |
160 | class QComboBox; | 160 | class QComboBox; |
161 | class QWidgetStack; | 161 | class QWidgetStack; |
162 | class QHBox; | 162 | class QHBox; |
163 | class OFileSelector : public QWidget { | 163 | class OFileSelector : public QWidget { |
164 | Q_OBJECT | 164 | Q_OBJECT |
165 | friend class OFileViewInterface; | 165 | friend class OFileViewInterface; |
166 | friend class OFileViewFileListView; | 166 | friend class OFileViewFileListView; |
167 | public: | 167 | public: |
168 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; | 168 | enum Mode { Open=1, Save=2, FileSelector=4, OPEN=1, SAVE=2, FILESELECTOR=4 }; |
169 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; | 169 | // enum OldMode { OPEN=1, SAVE=2, FILESELECTOR = 4 }; |
170 | enum Selector { Normal = 0, Extended=1, ExtendedAll =2, Default=3, NORMAL=0,EXTENDED=1, EXTENDED_ALL =2, DEFAULT=3 }; | 170 | enum Selector { Normal = 0, Extended=1, ExtendedAll =2, Default=3, NORMAL=0,EXTENDED=1, EXTENDED_ALL =2, DEFAULT=3 }; |
171 | // enum OldSelector { NORMAL = 0, EXTENDED =1, EXTENDED_ALL = 2}; | 171 | // enum OldSelector { NORMAL = 0, EXTENDED =1, EXTENDED_ALL = 2}; |
172 | 172 | ||
173 | OFileSelector(QWidget* parent, int mode, int selector, | 173 | OFileSelector(QWidget* parent, int mode, int selector, |
174 | const QString& dirName, | 174 | const QString& dirName, |
175 | const QString& fileName, | 175 | const QString& fileName, |
176 | const MimeTypes& mimetypes = MimeTypes(), | 176 | const MimeTypes& mimetypes = MimeTypes(), |
177 | bool newVisible = FALSE, bool closeVisible = FALSE ); | 177 | bool newVisible = FALSE, bool closeVisible = FALSE ); |
178 | 178 | ||
179 | OFileSelector(const QString& mimeFilter, QWidget* parent, | 179 | OFileSelector(const QString& mimeFilter, QWidget* parent, |
180 | const char* name = 0, bool newVisible = TRUE, bool closeVisible = FALSE ); | 180 | const char* name = 0, bool newVisible = TRUE, bool closeVisible = FALSE ); |
181 | ~OFileSelector(); | 181 | ~OFileSelector(); |
182 | 182 | ||
183 | const DocLnk* selected(); | 183 | const DocLnk* selected(); |
184 | 184 | ||
185 | QString selectedName()const; | 185 | QString selectedName()const; |
186 | QString selectedPath()const; | 186 | QString selectedPath()const; |
187 | QString directory()const; | 187 | QString directory()const; |
188 | 188 | ||
189 | DocLnk selectedDocument()const; | 189 | DocLnk selectedDocument()const; |
190 | 190 | ||
191 | int fileCount()const; | 191 | int fileCount()const; |
192 | void reread(); | 192 | void reread(); |
193 | 193 | ||
194 | int mode()const; | 194 | int mode()const; |
195 | int selector()const; | 195 | int selector()const; |
196 | 196 | ||
197 | 197 | ||
198 | void setNewVisible( bool b ); | 198 | void setNewVisible( bool b ); |
199 | void setCloseVisible( bool b ); | 199 | void setCloseVisible( bool b ); |
200 | void setNameVisible( bool b ); | 200 | void setNameVisible( bool b ); |
201 | 201 | ||
202 | signals: | 202 | signals: |
203 | void dirSelected( const QString& ); | 203 | void dirSelected( const QString& ); |
204 | void fileSelected( const DocLnk& ); | 204 | void fileSelected( const DocLnk& ); |