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/kio/kfile/kurlrequester.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kio/kfile/kurlrequester.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kio/kfile/kurlrequester.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/microkde/kio/kfile/kurlrequester.cpp b/microkde/kio/kfile/kurlrequester.cpp index ca94570..ce62da7 100644 --- a/microkde/kio/kfile/kurlrequester.cpp +++ b/microkde/kio/kfile/kurlrequester.cpp | |||
@@ -18,24 +18,26 @@ | |||
18 | 18 | ||
19 | 19 | ||
20 | #include <sys/stat.h> | 20 | #include <sys/stat.h> |
21 | #ifdef _WIN32_ | 21 | #ifdef _WIN32_ |
22 | 22 | ||
23 | #else | 23 | #else |
24 | #include <unistd.h> | 24 | #include <unistd.h> |
25 | #endif | 25 | #endif |
26 | #include <qstring.h> | 26 | #include <qstring.h> |
27 | //US #include <qtooltip.h> | 27 | //US #include <qtooltip.h> |
28 | 28 | ||
29 | #include <qpushbutton.h> | 29 | #include <qpushbutton.h> |
30 | //Added by qt3to4: | ||
31 | #include <QPixmap> | ||
30 | 32 | ||
31 | //US #include <kaccel.h> | 33 | //US #include <kaccel.h> |
32 | //US #include <kcombobox.h> | 34 | //US #include <kcombobox.h> |
33 | #include <kdebug.h> | 35 | #include <kdebug.h> |
34 | #include <kdialog.h> | 36 | #include <kdialog.h> |
35 | #include <kfiledialog.h> | 37 | #include <kfiledialog.h> |
36 | #include <kglobal.h> | 38 | #include <kglobal.h> |
37 | #include <kiconloader.h> | 39 | #include <kiconloader.h> |
38 | #include <klineedit.h> | 40 | #include <klineedit.h> |
39 | #include <klocale.h> | 41 | #include <klocale.h> |
40 | //US #include <kurlcompletion.h> | 42 | //US #include <kurlcompletion.h> |
41 | //US #include <kurldrag.h> | 43 | //US #include <kurldrag.h> |
@@ -173,60 +175,60 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent, | |||
173 | 175 | ||
174 | // must have this as parent | 176 | // must have this as parent |
175 | editWidget->reparent( this, 0, QPoint(0,0) ); | 177 | editWidget->reparent( this, 0, QPoint(0,0) ); |
176 | //US d->edit = dynamic_cast<KLineEdit*>( editWidget ); | 178 | //US d->edit = dynamic_cast<KLineEdit*>( editWidget ); |
177 | d->edit = (KLineEdit*)( editWidget ); | 179 | d->edit = (KLineEdit*)( editWidget ); |
178 | //US d->combo = dynamic_cast<KComboBox*>( editWidget ); | 180 | //US d->combo = dynamic_cast<KComboBox*>( editWidget ); |
179 | 181 | ||
180 | init(); | 182 | init(); |
181 | } | 183 | } |
182 | */ | 184 | */ |
183 | 185 | ||
184 | KURLRequester::KURLRequester( QWidget *parent, const char *name ) | 186 | KURLRequester::KURLRequester( QWidget *parent, const char *name ) |
185 | : QHBox( parent, name ) | 187 | : Q3HBox( parent, name ) |
186 | { | 188 | { |
187 | d = new KURLRequesterPrivate; | 189 | d = new KURLRequesterPrivate; |
188 | init(); | 190 | init(); |
189 | } | 191 | } |
190 | 192 | ||
191 | 193 | ||
192 | KURLRequester::KURLRequester( const QString& url, QWidget *parent, | 194 | KURLRequester::KURLRequester( const QString& url, QWidget *parent, |
193 | const char *name ) | 195 | const char *name ) |
194 | : QHBox( parent, name ) | 196 | : Q3HBox( parent, name ) |
195 | { | 197 | { |
196 | d = new KURLRequesterPrivate; | 198 | d = new KURLRequesterPrivate; |
197 | init(); | 199 | init(); |
198 | setURL( url ); | 200 | setURL( url ); |
199 | } | 201 | } |
200 | 202 | ||
201 | 203 | ||
202 | KURLRequester::~KURLRequester() | 204 | KURLRequester::~KURLRequester() |
203 | { | 205 | { |
204 | //US delete myCompletion; | 206 | //US delete myCompletion; |
205 | delete myFileDialog; | 207 | delete myFileDialog; |
206 | delete d; | 208 | delete d; |
207 | } | 209 | } |
208 | 210 | ||
209 | 211 | ||
210 | void KURLRequester::init() | 212 | void KURLRequester::init() |
211 | { | 213 | { |
212 | myFileDialog = 0L; | 214 | myFileDialog = 0L; |
213 | myShowLocalProt = false; | 215 | myShowLocalProt = false; |
214 | mPathIsDir = false; | 216 | mPathIsDir = false; |
215 | if (/*US !d->combo && */ !d->edit ) | 217 | if (/*US !d->combo && */ !d->edit ) |
216 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); | 218 | d->edit = new KLineEdit( this, "KURLRequester::KLineEdit" ); |
217 | 219 | ||
218 | myButton = new KURLDragPushButton( this, "kfile button"); | 220 | myButton = new KURLDragPushButton( this, "kfile button"); |
219 | QIconSet iconSet = SmallIconSet("fileopen"); | 221 | QIcon iconSet = SmallIconSet("fileopen"); |
220 | QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); | 222 | QPixmap pixMap = iconSet.pixmap( QIcon::Small, QIcon::Normal ); |
221 | myButton->setIconSet( iconSet ); | 223 | myButton->setIconSet( iconSet ); |
222 | myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); | 224 | myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); |
223 | //US QToolTip::add(myButton, i18n("Open file dialog")); | 225 | //US QToolTip::add(myButton, i18n("Open file dialog")); |
224 | 226 | ||
225 | connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() )); | 227 | connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() )); |
226 | 228 | ||
227 | setSpacing( KDialog::spacingHint() ); | 229 | setSpacing( KDialog::spacingHint() ); |
228 | 230 | ||
229 | QWidget *widget = /*US d->combo ? (QWidget*) d->combo : */ (QWidget*) d->edit; | 231 | QWidget *widget = /*US d->combo ? (QWidget*) d->combo : */ (QWidget*) d->edit; |
230 | setFocusProxy( widget ); | 232 | setFocusProxy( widget ); |
231 | 233 | ||
232 | d->connectSignals( this ); | 234 | d->connectSignals( this ); |