Diffstat (limited to 'libopie/ofileselector/olister.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/ofileselector/olister.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libopie/ofileselector/olister.h b/libopie/ofileselector/olister.h index 0885525..79d5409 100644 --- a/libopie/ofileselector/olister.h +++ b/libopie/ofileselector/olister.h | |||
@@ -8,4 +8,7 @@ | |||
8 | 8 | ||
9 | class QComboBox; | ||
9 | class OPixmapProvider; | 10 | class OPixmapProvider; |
10 | class OFileSelector; | 11 | class OFileSelector; |
12 | |||
13 | class OListerCmbAccess; | ||
11 | /** | 14 | /** |
@@ -17,2 +20,3 @@ class OFileSelector; | |||
17 | */ | 20 | */ |
21 | |||
18 | class OLister { | 22 | class OLister { |
@@ -29,3 +33,16 @@ public: | |||
29 | 33 | ||
34 | |||
35 | /* some way a slot */ | ||
36 | void fileSelected( const QString& dir, const QString& file, const QString& extra ) = 0; | ||
37 | void changeDir( const QString& dir, const QString& file, const QString& extra ) = 0; | ||
30 | protected: | 38 | protected: |
39 | /** | ||
40 | * I hate too big classes | ||
41 | * this is a way to group | ||
42 | * access to a ComboBox | ||
43 | * which might exist or | ||
44 | * not in a secure way | ||
45 | */ | ||
46 | OListerCmbAccess* comboBox(); | ||
47 | |||
31 | bool showFiles()const; | 48 | bool showFiles()const; |
@@ -35,3 +52,5 @@ protected: | |||
35 | QFileInfo*, | 52 | QFileInfo*, |
53 | const QString& extra = QString::null, | ||
36 | bool isSymlink = FALSE ); | 54 | bool isSymlink = FALSE ); |
55 | |||
37 | void addFile( const QString& mine, | 56 | void addFile( const QString& mine, |
@@ -39,2 +58,3 @@ protected: | |||
39 | const QString& file, | 58 | const QString& file, |
59 | const QString& extra = QString::null, | ||
40 | bool isSymlink = FALSE ); | 60 | bool isSymlink = FALSE ); |
@@ -46,2 +66,3 @@ protected: | |||
46 | const QString& dir, | 66 | const QString& dir, |
67 | const QString& extra = QString::null, | ||
47 | bool isSymlink = FALSE ); | 68 | bool isSymlink = FALSE ); |
@@ -49,2 +70,3 @@ protected: | |||
49 | QFileInfo* info, | 70 | QFileInfo* info, |
71 | const QString& extra = QString::null, | ||
50 | bool isSymlink = FALSE); | 72 | bool isSymlink = FALSE); |
@@ -53,2 +75,3 @@ protected: | |||
53 | const QString& name, | 75 | const QString& name, |
76 | const QString& extra = QString::null, | ||
54 | bool isSymlink = FALSE ); | 77 | bool isSymlink = FALSE ); |
@@ -59,3 +82,41 @@ private: | |||
59 | OPixmapProvider* m_prov; | 82 | OPixmapProvider* m_prov; |
83 | OListerCmbAccess* m_acc; | ||
84 | |||
85 | class Private; | ||
86 | Private *d; | ||
87 | }; | ||
88 | |||
89 | class OListerCmbAccess { | ||
90 | friend class OLister; | ||
91 | public: | ||
92 | OListerCmbAccess( QComboBox* = 0l); | ||
93 | ~OListerCmbAccess(); | ||
94 | |||
95 | /** | ||
96 | * clears the combobox | ||
97 | */ | ||
98 | void clear(); | ||
99 | |||
100 | /** | ||
101 | * set's @param add to be the current Item | ||
102 | * if the item is not present it'll be removed | ||
103 | */ | ||
104 | void setCurrentItem( const QString& add, bool FORECE_ADD = TRUE ); | ||
105 | |||
106 | /** | ||
107 | * inserts the the String at | ||
108 | * a non predictable position... The position is determined | ||
109 | * by the QComboBox code | ||
110 | */ | ||
111 | void insert( const QString& ); | ||
112 | |||
113 | /** | ||
114 | * | ||
115 | */ | ||
116 | QString currentText()const; | ||
60 | 117 | ||
118 | private: | ||
119 | class Private; | ||
120 | Private* d; | ||
121 | QComboBox* m_cmb; | ||
61 | 122 | ||