summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2005-07-09 01:35:06 (UTC)
committer zautrix <zautrix>2005-07-09 01:35:06 (UTC)
commite27ad31c6016152449bbdaf4f9f387fa61183c37 (patch) (unidiff)
tree615f3124d6f4f646287f126206ab93684caea7fb /microkde
parent3c756588a4f650fc6f2e5971d56d56b74d67bfda (diff)
downloadkdepimpi-e27ad31c6016152449bbdaf4f9f387fa61183c37.zip
kdepimpi-e27ad31c6016152449bbdaf4f9f387fa61183c37.tar.gz
kdepimpi-e27ad31c6016152449bbdaf4f9f387fa61183c37.tar.bz2
comp fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/microkde/kdialog.cpp b/microkde/kdialog.cpp
index f9e0126..8398956 100644
--- a/microkde/kdialog.cpp
+++ b/microkde/kdialog.cpp
@@ -1,71 +1,72 @@
1 1
2#include <kdialog.h> 2#include <kdialog.h>
3#include <qapp.h> 3#include <qapp.h>
4#include <qlabel.h> 4#include <qlabel.h>
5#include <qpushbutton.h> 5#include <qpushbutton.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qprogressbar.h> 7#include <qprogressbar.h>
8#include <klocale.h> 8#include <klocale.h>
9 9
10KDialog::KDialog( QWidget *parent, const char *name, bool modal ) : 10KDialog::KDialog( QWidget *parent, const char *name, bool modal ) :
11 QDialog( parent, name, modal ) 11 QDialog( parent, name, modal )
12{ 12{
13 ; 13 ;
14 14
15} 15}
16#ifdef DESKTOP_VERSION 16#ifdef DESKTOP_VERSION
17int KDialog::spacingHint() { return 7; } 17int KDialog::spacingHint() { return 7; }
18int KDialog::marginHint() { return 7; } 18int KDialog::marginHint() { return 7; }
19 19
20int KDialog::spacingHintSmall() { return 4; } 20int KDialog::spacingHintSmall() { return 4; }
21int KDialog::marginHintSmall() { return 4; } 21int KDialog::marginHintSmall() { return 4; }
22 22
23#else 23#else
24int KDialog::spacingHint() { return 3; } 24int KDialog::spacingHint() { return 3; }
25int KDialog::marginHint() { return 3; } 25int KDialog::marginHint() { return 3; }
26 26
27int KDialog::spacingHintSmall() { return 1; } 27int KDialog::spacingHintSmall() { return 1; }
28int KDialog::marginHintSmall() { return 1; } 28int KDialog::marginHintSmall() { return 1; }
29#endif 29#endif
30KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal ) : 30KProgressDialog::KProgressDialog( QWidget *parent, const char *name, bool modal ) :
31 QDialog( parent, name, modal ) 31 QDialog( parent, name, modal )
32{ 32{
33 QVBoxLayout* lay= new QVBoxLayout ( this ); 33 QVBoxLayout* lay= new QVBoxLayout ( this );
34 mLabel = new QLabel ( "abc",this ); 34 mLabel = new QLabel ( "abc",this );
35 mBar = new QProgressBar ( this ); 35 mBar = new QProgressBar ( this );
36 mButton = new QPushButton ( i18n("Cancel"),this ); 36 mButton = new QPushButton ( i18n("Cancel"),this );
37 lay->addWidget ( mLabel ); 37 lay->addWidget ( mLabel );
38 lay->addWidget ( mBar ); 38 lay->addWidget ( mBar );
39 lay->addWidget ( mButton ); 39 lay->addWidget ( mButton );
40 connect ( mButton , SIGNAL ( clicked () ), this, SIGNAL ( cancelled () )); 40 connect ( mButton , SIGNAL ( clicked () ), this, SIGNAL ( cancelled () ));
41 resize ( 220, sizeHint().height() +mLabel->sizeHint().height()); 41 resize ( 220, sizeHint().height() +mLabel->sizeHint().height());
42 42
43} 43}
44 44
45void KProgressDialog::setLabelText ( const QString & t) 45void KProgressDialog::setLabelText ( const QString & t)
46{ 46{
47 mLabel->setText( t ); 47 mLabel->setText( t );
48} 48}
49 49
50void KProgressDialog::setTotalSteps ( int totalSteps ) 50void KProgressDialog::setTotalSteps ( int totalSteps )
51{ 51{
52 setActiveWindow(); 52 setActiveWindow();
53 setFocus(); 53 setFocus();
54 mBar->setTotalSteps ( totalSteps ); 54 mBar->setTotalSteps ( totalSteps );
55} 55}
56void KProgressDialog::setProgress ( int progress ) 56void KProgressDialog::setProgress ( int progress )
57{ 57{
58 setActiveWindow(); 58 setActiveWindow();
59 setFocus(); 59 setFocus();
60 mBar->setProgress ( progress ); 60 mBar->setProgress ( progress );
61} 61}
62void KProgressDialog::accept() 62void KProgressDialog::accept()
63{ 63{
64 64 mLabel->setText( i18n("Eeek, there I am ticklish!") );
65 move ( geometry().x()-20,geometry().y()+20);
65 // QDialog::accept(); 66 // QDialog::accept();
66} 67}
67void KProgressDialog::reject() 68void KProgressDialog::reject()
68{ 69{
69 emit cancelled (); 70 emit cancelled ();
70 //QDialog::reject(); 71 //QDialog::reject();
71} 72}