QProgressBar* StatusBar::createProgressBar() { QProgressBar* pb = new QProgressBar(this); pb->setMaximumHeight(height()); addPermanentWidget(pb); return pb; }
void TelechargerFichier::finTelechargement() { QNetworkReply *reponse; reponse = qobject_cast<QNetworkReply *>(sender()); QPushButton *bouton = qobject_cast<QPushButton *>(listeTelechargements->cellWidget(reponses.indexOf(reponse), 0)); bouton->setDisabled(true); QProgressBar *progression = progressionsTelechargements.value(reponses.indexOf(reponse)); progression->setMaximum(100); progression->setValue(100); listeTelechargements->item(reponses.indexOf(reponse), 3)->setText("Transfert terminé"); QString nomFichier = nomsFichiers.value(reponses.indexOf(reponse)); QSettings emplacementDossier(Multiuso::appDirPath() + "/ini/config.ini", QSettings::IniFormat); QDir dir; dir.mkpath(emplacementDossier.value("telechargements/dossier").toString() + "/Multiuso - Téléchargements"); QFile fichier(emplacementDossier.value("telechargements/dossier").toString() + "/Multiuso - Téléchargements/" + nomFichier); fichier.open(QIODevice::WriteOnly | QIODevice::Truncate); fichier.write(reponse->readAll()); fichier.close(); }
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 ); }
void MainWindow::addRow( int fileId, const QString &fileName, int progress ) { int rowId = ui->files->rowCount(); ui->files->insertRow( rowId ); QTableWidgetItem *id = new QTableWidgetItem( QString::number(fileId) ); QTableWidgetItem *fn = new QTableWidgetItem( fileName ); QWidget *wt = new QWidget(); QSpacerItem *s1 = new QSpacerItem(1, 1, QSizePolicy::Fixed, QSizePolicy::Expanding ); QSpacerItem *s2 = new QSpacerItem(1, 7, QSizePolicy::Fixed, QSizePolicy::Expanding ); QVBoxLayout *lt = new QVBoxLayout( wt ); QProgressBar *pb = new QProgressBar( wt ); pb->setObjectName( "PROGRESS_BAR" ); pb->setParent( this ); pb->setValue( progress ); pb->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); lt->addSpacerItem( s1 ); lt->addWidget( pb ); lt->addSpacerItem( s2 ); lt->setMargin( 0 ); wt->setLayout( lt ); ui->files->setItem( rowId, 0, id ); ui->files->setItem( rowId, 1, fn ); ui->files->setCellWidget( rowId, 2, wt ); }
void Progression::onRemoveLabel(QString name) { qDebug() << "trying to remove label and progress bar for :" << name; for(int i = 0; i < vbl->count(); i++) { QLayoutItem* item = vbl->itemAt(i); QWidget* widget = item->widget(); if (widget) { QLabel *label = qobject_cast<QLabel *>(widget); if(label and label->objectName() == name ) { label->hide(); vbl->removeItem(item); qDebug() << "Remove Label"; i--; } QProgressBar * pb = qobject_cast<QProgressBar *>(widget); if(pb and pb->objectName() == name) { pb->hide(); vbl->removeItem(item); qDebug() << "Remove Progbar"; i--; } } } this->adjustSize(); }
int main(int argc, char ** argv) { using Q = QObject; QApplication app{argc, argv}; QWidget ui; QVBoxLayout layout{&ui}; QTextBrowser log; QProgressBar bar; QPushButton scan{"Scan localhost"}; layout.addWidget(&log); layout.addWidget(&bar); layout.addWidget(&scan); bar.setRange(1, 65535); ui.show(); Scanner scanner; Q::connect(&scan, &QPushButton::clicked, &scanner, [&]{ scan.setEnabled(false); scanner.start(); }); Q::connect(&scanner, &Scanner::hasResult, &log, [&](int port, bool isOpen){ bar.setValue(port); if (!isOpen) return; auto color = isOpen ? QStringLiteral("green") : QStringLiteral("red"); auto state = isOpen ? QStringLiteral("open") : QStringLiteral("closed"); log.append(QStringLiteral("<font color=\"%1\">Port %2 is %3.</font><br/>"). arg(color).arg(port).arg(state)); }); Q::connect(&scanner, &Scanner::done, &scan, [&]{ bar.reset(); scan.setEnabled(true); }); return app.exec(); }
void UIStateHelper::updateData(UIStateHelperData *data) { QMap<QWidget*, UIStates>::iterator it; for (it = data->mWidgets.begin(); it != data->mWidgets.end(); ++it) { QWidget *widget = it.key(); UIStates states = it.value(); if (states & (UISTATE_LOADING_VISIBLE | UISTATE_LOADING_INVISIBLE | UISTATE_ACTIVE_VISIBLE | UISTATE_ACTIVE_INVISIBLE)) { bool visible = isWidgetVisible(widget); widget->setVisible(visible); if (!visible) { /* Reset progressbar */ QProgressBar *progressBar = dynamic_cast<QProgressBar*>(widget); if (progressBar) { progressBar->setValue(0); } } } if (states & (UISTATE_LOADING_ENABLED | UISTATE_LOADING_DISABLED | UISTATE_ACTIVE_ENABLED | UISTATE_ACTIVE_DISABLED)) { widget->setEnabled(isWidgetEnabled(widget)); } } }
void MangaW::LookingForDB(void) { QWidget * loadingWidget = new QWidget; QVBoxLayout * loadingLayout = new QVBoxLayout; // Layout Vertical Box QLabel * loadingTexte = new QLabel("Restauration des sauvegardes"); // Label = Texte QProgressBar * loadingProgressBar = new QProgressBar; // Barre de progression loadingProgressBar->setRange(0, 0); // ProgressBar en "chargement indéfini" loadingLayout->addWidget(loadingTexte); loadingLayout->addWidget(loadingProgressBar); loadingWidget->setLayout(loadingLayout); // On ajoute le layout au Widget loadingWidget->show(); // On affiche le widget // On vérifie l'existance de la sauvegarde if ( T.DB_Existe() && T.DB_Charger() ) { loadingWidget->close(); this->ClassicStart(); } else { loadingWidget->close(); this->FirstStart(); } // --- }
KRPleaseWait::KRPleaseWait(QString msg, QWidget *parent, int count, bool cancel): QProgressDialog(cancel ? 0 : parent) , inc(true) { setModal(!cancel); timer = new QTimer(this); setWindowTitle(i18n("Krusader::Wait")); setMinimumDuration(500); setAutoClose(false); setAutoReset(false); connect(timer, SIGNAL(timeout()), this, SLOT(cycleProgress())); QProgressBar* progress = new QProgressBar(this); progress->setMaximum(count); progress->setMinimum(0); setBar(progress); QLabel* label = new QLabel(this); setLabel(label); QPushButton* btn = new QPushButton(i18n("&Cancel"), this); setCancelButton(btn); btn->setEnabled(canClose = cancel); setLabelText(msg); show(); }
void tst_QProgressBar::minMaxSameValue() { QProgressBar bar; bar.setRange(10, 10); bar.setValue(10); bar.show(); }
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; }
void setupUi(QDialog *Dialog) { Dialog->setObjectName(QString::fromUtf8("Dialog")); verticalLayout = new QWidget(Dialog); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); verticalLayout->setGeometry(QRect(9, 9, 215, 89)); vboxLayout = new QVBoxLayout(verticalLayout); vboxLayout->setSpacing(6); vboxLayout->setMargin(0); vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); labelTimeLeft = new QLabel(verticalLayout); labelTimeLeft->setObjectName(QString::fromUtf8("labelTimeLeft")); vboxLayout->addWidget(labelTimeLeft); labelImages = new QLabel(verticalLayout); labelImages->setObjectName(QString::fromUtf8("labelImages")); vboxLayout->addWidget(labelImages); progressBar = new QProgressBar(verticalLayout); progressBar->setObjectName(QString::fromUtf8("progressBar")); progressBar->setValue(0); progressBar->setOrientation(Qt::Horizontal); vboxLayout->addWidget(progressBar); retranslateUi(Dialog); QSize size(236, 111); size = size.expandedTo(Dialog->minimumSizeHint()); Dialog->resize(size); QMetaObject::connectSlotsByName(Dialog); } // setupUi
void Profile::setLabel() { QLabel *item; QProgressBar *bar; bar = this->findChild<QProgressBar *>("LifeBar"); bar->setValue(_hero->getLife()); bar->setMaximum(_hero->getLifeMax()); bar = this->findChild<QProgressBar *>("ManaBar"); bar->setValue(_hero->getMana()); bar->setMaximum(_hero->getManaMax()); item = this->findChild<QLabel *>("Name"); item->setText(QString::fromStdString(_hero->getName())); item = this->findChild<QLabel *>("RaceClass"); item->setText(QString::fromStdString(SRace[static_cast<uint>(_hero->getRace())]) + " " + QString::fromStdString(SClass[static_cast<uint>(_hero->getClass())])); item = this->findChild<QLabel *>("Lvl"); item->setText("Lvl " + QString::number(_hero->getLvl())); item = this->findChild<QLabel *>("Agility"); item->setText("Agility : " + QString::number(_hero->getAgility())); item = this->findChild<QLabel *>("Intellect"); item->setText("Intellect : " + QString::number(_hero->getIntellect())); item = this->findChild<QLabel *>("Stamina"); item->setText("Stamina : " + QString::number(_hero->getStamina())); item = this->findChild<QLabel *>("Strength"); item->setText("Strength : " + QString::number(_hero->getStrength())); /* int fd = open("/Users/Arnaud/totoHero.txt", O_RDWR); int d = write(fd, reinterpret_cast<void *>(_hero), sizeof(KiwiHero)); int size = sizeof(KiwiHero); KiwiHero *test = new KiwiHero(); int n = read(fd, test, size); qDebug() << "Race is : " << QString::fromStdString(test->getName()) << d << n; delete test; ::close(fd); */ /* QFile file; QDir::setCurrent("/Users/Arnaud"); file.setFileName("totoHero.txt"); if (!(file.open(QIODevice::ReadWrite | QIODevice::Truncate))) qDebug() << "open failed"; else qDebug() << "open success"; QDataStream out(&file); out.writeBytes(reinterpret_cast<const char *>(_hero), sizeof(KiwiHero)); KiwiHero *test = new KiwiHero(); QByteArray line = file.readLine(); qDebug() << line; //qDebug() << "Race is : " << QString::toStdString(SRace[static_cast<uint>(test->getRace())]); delete test; */ }
void BrowserView::onLoadStarted() { QProgressBar* bar = Gui::Sequencer::instance()->getProgressBar(); bar->setRange(0, 100); bar->show(); Gui::getMainWindow()->showMessage(tr("Loading %1...").arg(view->url().toString())); isLoading = true; }
void ArchiveList::fillPartialArchiveItem(PartialArchive *a, QTreeWidgetItem *item) { QTreeWidgetItem *subItem = new QTreeWidgetItem(item); QPushButton *pauseButton = new QPushButton(); pauseButton->setText(a->isDownloading() ? tr("Pause") : tr("Continue")); connect(pauseButton, SIGNAL(clicked()), a, SLOT(togglePauseDownload())); downloadPausedMapper->setMapping(a, pauseButton); downloadStartedMapper->setMapping(a, pauseButton); connect(a, SIGNAL(downloadStarted()), downloadStartedMapper, SLOT(map())); connect(a, SIGNAL(downloadPaused()), downloadPausedMapper, SLOT(map())); int pbarColumn; if (compactLayout) { pbarColumn = 1; subItem->setSizeHint(1, pauseButton->sizeHint()); setItemWidget(subItem, 1, pauseButton); QPushButton *detailsButton = new QPushButton(tr("Details")); showDetailsMapper->setMapping(detailsButton, a); connect(detailsButton, SIGNAL(clicked()), showDetailsMapper, SLOT(map())); subItem->setSizeHint(0, detailsButton->sizeHint()); setItemWidget(subItem, 0, detailsButton); } else { pbarColumn = 2; item->setSizeHint(3, pauseButton->sizeHint()); setItemWidget(item, 3, pauseButton); item->setText(1, a->getSizeMB()); QLabel *peerInfo = new QLabel(); subItem->setSizeHint(1, peerInfo->sizeHint()); setItemWidget(subItem, 1, peerInfo); connect(a, SIGNAL(peerInfoUpdated(QString)), peerInfo, SLOT(setText(QString))); QLabel *speedText = new QLabel(); subItem->setSizeHint(2, speedText->sizeHint()); setItemWidget(subItem, 2, speedText); connect(a, SIGNAL(speedTextUpdated(QString)), speedText, SLOT(setText(QString))); QLabel *statusText = new QLabel(); subItem->setSizeHint(3, statusText->sizeHint()); setItemWidget(subItem, 3, statusText); connect(a, SIGNAL(statusTextUpdated(QString)), statusText, SLOT(setText(QString))); } QProgressBar *pbar = new QProgressBar(); pbar->setMinimum(0); pbar->setMaximum(100); item->setSizeHint(pbarColumn, pbar->sizeHint()); setItemWidget(item, pbarColumn, pbar); connect(a, SIGNAL(progressUpdated(int)), pbar, SLOT(setValue(int))); a->emitStatusEvents(); }
void MessageDisplayWidget::appendProgress(const QString &filename, FileTransferState* state, bool isOur) { connect(verticalScrollBar(), &QScrollBar::rangeChanged, this, &MessageDisplayWidget::moveScrollBarToBottom, Qt::UniqueConnection); QProgressBar *row = new QProgressBar(this); row->setRange(0, 100); row->setFormat(QString("%1 - %p%").arg(QFileInfo(filename).baseName())); connect(state, &FileTransferState::progressChanged, row, &QProgressBar::setValue); mainlayout->addWidget(row); }
FENETRE::FENETRE():QWidget() { // QWidget::showMaximized (); // 1 : Créer le QTabWidget QTabWidget *onglets = new QTabWidget(this); onglets->setGeometry(30, 20, 240, 160); // 2 : Créer les pages, en utilisant un widget parent pour contenir chacune des pages QWidget *page1 = new QWidget; QWidget *page2 = new QWidget; QLabel *page3 = new QLabel; // Comme un QLabel est aussi un QWidget (il en hérite), on peut aussi s'en servir de page // 3 : Créer le contenu des pages de widgets // Page 1 QLineEdit *lineEdit = new QLineEdit("Entrez votre nom"); QPushButton *bouton1 = new QPushButton("Cliquez ici"); QPushButton *bouton2 = new QPushButton("Ou là..."); QVBoxLayout *vbox1 = new QVBoxLayout; vbox1->addWidget(lineEdit); vbox1->addWidget(bouton1); vbox1->addWidget(bouton2); page1->setLayout(vbox1); // Page 2 QProgressBar *progress = new QProgressBar; progress->setValue(50); QSlider *slider = new QSlider(Qt::Horizontal); QPushButton *bouton3 = new QPushButton("Valider"); QVBoxLayout *vbox2 = new QVBoxLayout; vbox2->addWidget(progress); vbox2->addWidget(slider); vbox2->addWidget(bouton3); page2->setLayout(vbox2); // Page 3 (je ne vais afficher qu'une image ici, pas besoin de layout) page3->setPixmap(QPixmap("icone.png")); page3->setAlignment(Qt::AlignCenter); // 4 : ajouter les onglets au QTabWidget, en indiquant la page qu'ils contiennent onglets->addTab(page1, "Coordonnées"); onglets->addTab(page2, "Progression"); onglets->addTab(page3, "Image"); }
void BrowserView::onLoadFinished(bool ok) { if (ok) { QProgressBar* bar = Sequencer::instance()->getProgressBar(); bar->setValue(100); bar->hide(); getMainWindow()->showMessage(QString()); } isLoading = false; }
void FtpSessionDialog::queryFile(int id, QString& name) { int rowCount = progressTable->rowCount(); progressTable->setRowCount(rowCount + 1); progressTable->setItem(rowCount, 0, new QTableWidgetItem(name)); QProgressBar *progressBar = new QProgressBar; progressBar->setMinimum(0); progressBar->setValue(0); progressBars->insert(id, progressBar); progressTable->setCellWidget(rowCount, 1, progressBar); }
void inc_progress_bar(int, int, void *p) { QProgressBar *bar = (QProgressBar *)p; int value = bar->value(); if (value == bar->maximum()) { bar->reset(); } else { bar->setValue(value +1); } }
void server::updatefileview(qint64 bytesreveived, qint64 totalbytes, QString filename, tcpsocket *clientsocket, QString id) { QString name = id+QString("/")+filename; if(this->filelist.contains(name)){ QProgressBar *tem = this->filelist.value(name); tem->setValue(bytesreveived); } if(totalbytes == bytesreveived){ //从filelist中删除 this->filelist.remove(name); } }
void CalculateAmplitudes::filterView(int startRow, int cnt) { bool showSuccess = _ui.comboFilterState->currentIndex() == 1; bool showErrors = _ui.comboFilterState->currentIndex() == 2; bool showProgress = _ui.comboFilterState->currentIndex() == 3; QString type = _ui.comboFilterType->currentIndex() == 0?"":_ui.comboFilterType->currentText(); int endRow; if ( cnt < 0 ) endRow = _ui.table->rowCount(); else endRow = startRow + cnt; for ( int i = startRow; i < endRow; ++i ) { bool hide = false; if ( showSuccess ) { QProgressBar *progressBar = static_cast<QProgressBar*>(_ui.table->cellWidget(i, 3)); QTableWidgetItem *item = _ui.table->item(i, 3); if ( progressBar != NULL && progressBar->value() < 100 ) hide = true; else if ( item && item->data(Qt::UserRole) == 1 ) hide = true; } if ( showErrors ) { QTableWidgetItem *item = _ui.table->item(i, 3); if ( _ui.table->cellWidget(i, 3) != NULL || (item && item->data(Qt::UserRole) != 1) ) hide = true; } if ( showProgress ) { QProgressBar *progressBar = static_cast<QProgressBar*>(_ui.table->cellWidget(i, 3)); QTableWidgetItem *item = _ui.table->item(i, 3); if ( progressBar == NULL || progressBar->value() == 100 ) hide = true; else if ( item && item->data(Qt::UserRole) == 1 ) hide = true; } if ( !type.isEmpty() ) { if ( _ui.table->item(i, 1)->text() != type ) hide = true; } if ( hide ) _ui.table->hideRow(i); else _ui.table->showRow(i); } }
void MainWindow::fileProgressChanged( int fileId, int progress ) { int rowId = rowForFileId( fileId ); Q_ASSERT( rowId >= 0 && ui->files->rowCount() > rowId ); QWidget *w = ui->files->cellWidget( rowId, 2 ); Q_ASSERT( w != 0 ); QProgressBar *p = w->findChild<QProgressBar*>( "PROGRESS_BAR" ); Q_ASSERT( p != 0 ); p->setValue( progress ); }
void Ide::onRunnableStarted() { onRunnableStopped(); QProgressBar *bar; _progressDialog = new QProgressDialog(this, Qt::CustomizeWindowHint); _progressDialog->setBar(bar = new QProgressBar(_progressDialog)); _progressDialog->setCancelButton(nullptr); _progressDialog->setLabelText(Qrc::text("dialog.waiting.message")); _progressDialog->setRange(0, 0); _progressDialog->setWindowModality(Qt::WindowModal); _progressDialog->show(); bar->setTextVisible(false); }
void tst_QProgressBar::formatedText() { QFETCH(int, minimum); QFETCH(int, maximum); QFETCH(int, value); QFETCH(QString, format); QFETCH(QString, text); QProgressBar bar; bar.setRange(minimum, maximum); bar.setValue(value); bar.setFormat(format); QCOMPARE(bar.text(), text); }
void ConnectionChecker::timeOut() { i++; if( i > 5000 ) { ui->statusLabel->setText( "No Data Recieved, Change Port" ); timer->stop(); } QProgressBar* bar = ui->statusBar; bar->setValue(bar->value()+1); if( bar->value() > 99 ) bar->setValue(0); }
void ProgressBarDuo::setMax(int max, int n) { QProgressBar *p = 0; switch(n) { case 0: p = ui->Bar0; break; case 1: p = ui->Bar1; break; default: break; } if(p) p->setMaximum(max); }
bool downloadTracksFromOSM(QWidget* Main, const QString& aWeb, const QString& aUser, const QString& aPassword, const CoordBox& aBox , Document* theDocument) { Downloader theDownloader(aUser, aPassword); QList<TrackLayer*> theTracklayers; //TrackMapLayer* trackLayer = new TrackMapLayer(QApplication::translate("Downloader","Downloaded tracks")); //theDocument->add(trackLayer); IProgressWindow* aProgressWindow = dynamic_cast<IProgressWindow*>(Main); if (!aProgressWindow) return false; QProgressDialog* dlg = aProgressWindow->getProgressDialog(); dlg->setWindowTitle(QApplication::translate("Downloader","Parsing...")); QProgressBar* Bar = aProgressWindow->getProgressBar(); Bar->setTextVisible(false); Bar->setMaximum(11); QLabel* Lbl = aProgressWindow->getProgressLabel(); Lbl->setText(QApplication::translate("Downloader","Parsing XML")); if (dlg) dlg->show(); theDownloader.setAnimator(dlg,Lbl,Bar,true); for (int Page=0; ;++Page) { Lbl->setText(QApplication::translate("Downloader","Downloading trackpoints %1-%2").arg(Page*5000+1).arg(Page*5000+5000)); QString URL = theDownloader.getURLToTrackPoints(); URL = URL.arg(aBox.bottomLeft().x()). arg(aBox.bottomLeft().y()). arg(aBox.topRight().x()). arg(aBox.topRight().y()). arg(Page); QUrl theUrl(aWeb+URL); if (!theDownloader.go(theUrl)) return false; if (theDownloader.resultCode() != 200) return false; int Before = theTracklayers.size(); QByteArray Ar(theDownloader.content()); bool OK = importGPX(Main, Ar, theDocument, theTracklayers, true); if (!OK) return false; if (Before == theTracklayers.size()) break; theTracklayers[theTracklayers.size()-1]->setName(QApplication::translate("Downloader", "Downloaded track - nodes %1-%2").arg(Page*5000+1).arg(Page*5000+5000)); } return true; }
void Progression::addCopy(QString src, QString){ QLabel * label = new QLabel(src, this); label->setObjectName(src); label->setMaximumSize(780, 30); label->setGeometry(label->x(), label->y(), 780, label->height()); QProgressBar * prog = new QProgressBar(this); prog->setObjectName(src); prog->setMaximum(QFile(src).size()); vbl->addWidget(label); vbl->addWidget(prog); ProgressBars[label->text()] = prog; qDebug() << label->text(); this->adjustSize(); }
QResourceEditorProgressDialog::QResourceEditorProgressDialog( QWidget * parent, Qt::WindowFlags f, bool _isCycled) : QProgressDialog(parent, f) { isCycled = _isCycled; timeIntervalForPercent = TIME_INTERVAL_FOR_1_PERCENT; connect(&timer, SIGNAL(timeout()), this, SLOT(UpdateProgress()), Qt::QueuedConnection); if(isCycled) { //add custom bar to avoid parcents displaying QProgressBar *bar = new QProgressBar(this); bar->setTextVisible(false); this->setBar(bar); } }