本文整理汇总了C++中QProgressBar::setMaximumHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ QProgressBar::setMaximumHeight方法的具体用法?C++ QProgressBar::setMaximumHeight怎么用?C++ QProgressBar::setMaximumHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgressBar
的用法示例。
在下文中一共展示了QProgressBar::setMaximumHeight方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QTreeWidgetItem
void K3b::ImageWritingDialog::calculateMd5Sum( const QString& file )
{
d->haveMd5Sum = false;
if( !d->md5SumItem ) {
d->md5SumItem = new QTreeWidgetItem( d->infoView );
}
d->md5SumItem->setText( 0, i18n("MD5 Sum:") );
d->md5SumItem->setForeground( 0, d->infoTextColor );
d->md5SumItem->setTextAlignment( 0, Qt::AlignRight );
if( file != d->lastCheckedFile ) {
QProgressBar* progress = new QProgressBar( d->infoView );
progress->setMaximumHeight( fontMetrics().height() );
progress->setRange( 0, 100 );
progress->setValue( 0 );
d->infoView->setItemWidget( d->md5SumItem, 1, progress );
d->lastCheckedFile = file;
d->md5Job->setFile( file );
d->md5Job->start();
}
else
slotMd5JobFinished( true );
}
示例2: createProgressBar
QProgressBar* StatusBar::createProgressBar()
{
QProgressBar* pb = new QProgressBar(this);
pb->setMaximumHeight(height());
addPermanentWidget(pb);
return pb;
}
示例3: execMaj
int Patcher::execMaj()
{
if (maj_avalible <= 0)
return 0;
QProgressBar progressBar;
progressBar.setMaximumHeight(16);
progressBar.setMaximumWidth(200);
//progressBar->setTextVisible(false);
progressBar.setRange(0,maj_avalible);
this->statusBar()->addPermanentWidget(&progressBar, 0);
this->statusBar()->showMessage(QString("Loading"));
int nb = 0;
int i = 1;
for(patcher::Maj& maj : majs)
{
this->statusBar()->showMessage(QString("download "+QString::number(i)+"/"+QString::number(maj_avalible)));
if(not maj.isDone())
nb+= maj.apply();
progressBar.setValue(++i);
}
this->statusBar()->clearMessage();
this->statusBar()->removeWidget(&progressBar);
return nb;
}
示例4: createWidgets
void MyFracWindow::createWidgets()
{
KDockWidget* dockMain = createDockWidget("main", NULL);
_tabWidget = new QTabWidget(dockMain);
dockMain->setWidget(_tabWidget);
_view2D = new ViewWidget(true, _tabWidget);
_tabWidget->addTab(_view2D, SmallIconSet("frtab2d"), i18n("2D View"));
_view3D = new View3DWidget(_tabWidget);
_tabWidget->addTab(_view3D, SmallIconSet("frtab3d"), i18n("3D View"));
_dockParams = createDockWidget("params", SmallIcon("frparams"), NULL,
i18n("Parameters"));
QWidget* params = createParamsDock(_dockParams);
_dockParams->setWidget(params);
_dockDisplay = createDockWidget("display", SmallIcon("frdisplay"), NULL,
i18n("Display"));
QWidget* display = createDisplayDock(_dockParams);
_dockDisplay->setWidget(display);
_dockPreview = createDockWidget("preview", SmallIcon("viewmag"), NULL, i18n("Preview"));
ViewWidget* preview = new ViewWidget(false, _dockPreview);
_dockPreview->setWidget(preview);
dockMain->setDockSite(KDockWidget::DockCorner);
dockMain->setEnableDocking(KDockWidget::DockNone);
setView(dockMain);
setMainDockWidget(dockMain);
KDockWidget* dock1 = _dockDisplay->manualDock(_dockParams, KDockWidget::DockCenter);
KDockWidget* dock2 = _dockPreview->manualDock(dock1, KDockWidget::DockBottom, 65);
dock2->manualDock(dockMain, KDockWidget::DockRight, 65);
connect(_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(tabChanged()));
connect(this, SIGNAL(view2DEnabled(bool)), _view2D, SLOT(setVisible(bool)));
connect(this, SIGNAL(view3DEnabled(bool)), _view3D, SLOT(setVisible(bool)));
connect(this, SIGNAL(previewEnabled(bool)), _view2D, SLOT(enablePreview(bool)));
connect(this, SIGNAL(positionChanged(double, double, double, double)), _view2D, SLOT(setPosition(double, double, double, double)));
connect(this, SIGNAL(positionChanged(double, double, double, double)), _view3D, SLOT(setPosition(double, double, double, double)));
connect(this, SIGNAL(positionChanged(double, double, double, double)), preview, SLOT(setPreviewPosition(double, double, double, double)));
connect(this, SIGNAL(modeChangedMandelbrot()), _view2D, SLOT(setMandelbrotMode()));
connect(this, SIGNAL(modeChangedMandelbrot()), _view3D, SLOT(setMandelbrotMode()));
connect(this, SIGNAL(modeChangedJulia(double, double)), _view2D, SLOT(setJuliaMode(double, double)));
connect(this, SIGNAL(modeChangedJulia(double, double)), _view3D, SLOT(setJuliaMode(double, double)));
connect(this, SIGNAL(precisionChanged(double, double)), _view2D, SLOT(setQuality(double, double)));
connect(this, SIGNAL(precisionChanged(double, double)), _view3D, SLOT(setQuality(double, double)));
connect(this, SIGNAL(precisionChanged(double, double)), preview, SLOT(setQuality(double, double)));
connect(this, SIGNAL(backgroundChanged(QRgb)), _view2D, SLOT(setBackground(QRgb)));
connect(this, SIGNAL(backgroundChanged(QRgb)), _view3D, SLOT(setBackground(QRgb)));
connect(this, SIGNAL(backgroundChanged(QRgb)), preview, SLOT(setBackground(QRgb)));
connect(this, SIGNAL(gradientChanged(const QRgb*, double, double)), _view2D, SLOT(setGradient(const QRgb*, double, double)));
connect(this, SIGNAL(gradientChanged(const QRgb*, double, double)), _view3D, SLOT(setGradient(const QRgb*, double, double)));
connect(this, SIGNAL(gradientChanged(const QRgb*, double, double)), preview, SLOT(setGradient(const QRgb*, double, double)));
connect(_view2D, SIGNAL(previewVisible(bool)), preview, SLOT(setVisible(bool)));
connect(_view2D, SIGNAL(previewPosition(double, double)), preview, SLOT(setJuliaMode(double, double)));
connect(_view2D, SIGNAL(positionChanged(double, double, double, double)), this, SLOT(setPosition(double, double, double, double)));
connect(_view2D, SIGNAL(previewDoubleClick(double, double)), this, SLOT(setJuliaMode(double, double)));
connect(this, SIGNAL(gridSizeChanged(int, int)), _view3D, SLOT(setGridSize(int, int)));
connect(this, SIGNAL(heightScaleChanged(double)), _view3D, SLOT(setHeightScale(double)));
_view2D->enableTransform(true);
KStatusBar* status = statusBar();
status->setSizeGripEnabled(false);
QProgressBar* progress = new QProgressBar(100, status);
progress->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
progress->setMaximumHeight(status->sizeHint().height() - 2);
progress->setMinimumWidth(120);
progress->setProgress(100);
status->addWidget(progress, 0, true);
connect(_view2D, SIGNAL(updateProgress(int)), progress, SLOT(setProgress(int)));
connect(_view3D, SIGNAL(updateProgress(int)), progress, SLOT(setProgress(int)));
}