32 #include "folderdiaquotatab_p.h"
36 #include <tqprogressbar.h>
37 #include <tqwhatsthis.h>
38 #include <tqcombobox.h>
43 #include "tdelocale.h"
44 #include "tdeconfig.h"
47 #include "globalsettings.h"
48 #include "quotajobs.h"
50 using namespace KMail;
54 QuotaWidget::QuotaWidget( TQWidget* parent, const char* name )
55 :TQWidget( parent, name )
57 TQVBoxLayout *box = new TQVBoxLayout( this);
58 TQWidget *stuff = new TQWidget( this );
59 TQGridLayout* layout =
60 new TQGridLayout( stuff, 3, 3,
61 KDialog::marginHint(),
62 KDialog::spacingHint() );
63 mInfoLabel = new TQLabel( "", stuff );
64 mRootLabel = new TQLabel( "", stuff );
65 mProgressBar = new TQProgressBar( stuff );
66 layout->addWidget( new TQLabel( i18n( "Root:" ), stuff ), 0, 0 );
67 layout->addWidget( mRootLabel, 0, 1 );
68 layout->addWidget( new TQLabel( i18n( "Usage:"), stuff ), 1, 0 );
70 layout->addWidget( mInfoLabel, 1, 1 );
71 layout->addWidget( mProgressBar, 2, 1 );
72 box->addWidget( stuff );
76 void QuotaWidget::setQuotaInfo( const QuotaInfo& info )
80 int current = info.current().toInt();
81 int max = info.max().toInt();
82 mProgressBar->setProgress( current, max );
83 mInfoLabel->setText( info.toString() );
84 mRootLabel->setText( info.root() );
88 #include "folderdiaquotatab_p.moc"
|