本文整理汇总了C++中QProgressBar::setWindowTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ QProgressBar::setWindowTitle方法的具体用法?C++ QProgressBar::setWindowTitle怎么用?C++ QProgressBar::setWindowTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QProgressBar
的用法示例。
在下文中一共展示了QProgressBar::setWindowTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createProfile
void ProfileWizard::createProfile(int result)
{
if (_profile_edit->isComplete() )
{
bts::profile_config conf;
conf.firstname = _profile_edit->ui.first_name->text().toUtf8().constData();
conf.firstname = fc::trim( conf.firstname );
conf.middlename = _profile_edit->ui.middle_name->text().toUtf8().constData();
conf.middlename = fc::trim( conf.middlename );
conf.lastname = _profile_edit->ui.last_name->text().toUtf8().constData();
conf.lastname = fc::trim( conf.lastname );
conf.brainkey = _profile_edit->ui.brainkey->text().toUtf8().constData();
conf.brainkey = fc::trim( conf.brainkey );
std::string password = _profile_edit->ui.local_password1->text().toUtf8().constData();
std::string profile_name = conf.firstname + " " + conf.lastname;
auto app = bts::application::instance();
fc::thread* main_thread = &fc::thread::current();
QProgressBar* progress = new QProgressBar();
progress->setWindowTitle( "Creating Profile" );
progress->setMaximum(1000);
progress->resize( 640, 20 );
progress->show();
auto profile = app->create_profile(profile_name, conf, password,
[=]( double p )
{
main_thread->async( [=](){
progress->setValue( 1000*p );
qApp->sendPostedEvents();
qApp->processEvents();
if( p >= 1.0 ) progress->deleteLater();
} ).wait();
}
);
assert(profile != nullptr);
//store myself as contact
/*
std::string dac_id_string = _nym_page->_profile_nym_ui.keyhotee_id->text().toStdString();
bts::addressbook::wallet_contact myself;
myself.wallet_index = 0;
myself.first_name = conf.firstname;
myself.last_name = conf.lastname;
myself.set_dac_id(dac_id_string);
auto priv_key = profile->get_keychain().get_identity_key(myself.dac_id_string);
myself.public_key = priv_key.get_public_key();
profile->get_addressbook()->store_contact(myself);
//store myself as identity
bts::addressbook::wallet_identity new_identity;
static_cast<bts::addressbook::contact&>(new_identity) = myself;
profile->store_identity(new_identity);
bts::application::instance()->add_receive_key(priv_key);
*/
_mainApp.displayMainWindow();
}
}
示例2: rasterRender
void RenderCommand::rasterRender(bool isPreview)
{
ToonzScene *scene = TApp::instance()->getCurrentScene()->getScene();
if (isPreview) {
//Let the PreviewFxManager own the rest. Just pass him the current output node.
PreviewFxManager::instance()->showNewPreview((TFx *)scene->getXsheet()->getFxDag()->getCurrentOutputFx());
return;
}
string ext = m_fp.getType();
#ifdef WIN32
if (ext == "avi" && !isPreview) {
TPropertyGroup *props = scene->getProperties()->getOutputProperties()->getFileFormatProperties(ext);
string codecName = props->getProperty(0)->getValueAsString();
TDimension res = scene->getCurrentCamera()->getRes();
if (!AviCodecRestrictions::canWriteMovie(toWideString(codecName), res)) {
QString msg(QObject::tr("The resolution of the output camera does not fit with the options chosen for the output file format."));
MsgBox(WARNING, msg);
return;
}
}
#endif;
//Extract output properties
TOutputProperties *prop = isPreview ? scene->getProperties()->getPreviewProperties() : scene->getProperties()->getOutputProperties();
//Build thread count
/*-- Dedicated CPUs のコンボボックス (Single, Half, All) --*/
int index = prop->getThreadIndex();
const int procCount = TSystem::getProcessorCount();
const int threadCounts[3] = {1, procCount / 2, procCount};
int threadCount = threadCounts[index];
/*-- MovieRendererを作る。Previewの場合はファイルパスは空 --*/
MovieRenderer movieRenderer(scene, isPreview ? TFilePath() : m_fp, threadCount, isPreview);
TRenderSettings rs = prop->getRenderSettings();
//Build raster granularity size
index = prop->getMaxTileSizeIndex();
const int maxTileSizes[4] = {
(std::numeric_limits<int>::max)(),
TOutputProperties::LargeVal,
TOutputProperties::MediumVal,
TOutputProperties::SmallVal};
rs.m_maxTileSize = maxTileSizes[index];
//Build
#ifdef BRAVODEMO
rs.m_mark = loadBravo(scene->getCurrentCamera()->getRes());
#endif
/*-- RenderSettingsをセット --*/
movieRenderer.setRenderSettings(rs);
/*-- カメラDPIの取得、セット --*/
TPointD cameraDpi = isPreview ? scene->getCurrentPreviewCamera()->getDpi() : scene->getCurrentCamera()->getDpi();
movieRenderer.setDpi(cameraDpi.x, cameraDpi.y);
movieRenderer.enablePrecomputing(true);
/*-- プログレス ダイアログの作成 --*/
RenderListener *listener =
new RenderListener(movieRenderer.getTRenderer(), m_fp, ((m_numFrames - 1) / m_step) + 1, isPreview);
QObject::connect(listener, SIGNAL(canceled()), &movieRenderer, SLOT(onCanceled()));
movieRenderer.addListener(listener);
bool fieldRendering = rs.m_fieldPrevalence != TRenderSettings::NoField;
/*-- buildSceneFxの進行状況を表示するプログレスバー --*/
QProgressBar *buildSceneProgressBar = new QProgressBar(TApp::instance()->getMainWindow());
buildSceneProgressBar->setAttribute(Qt::WA_DeleteOnClose);
buildSceneProgressBar->setWindowFlags(Qt::SubWindow | Qt::Dialog | Qt::WindowStaysOnTopHint);
buildSceneProgressBar->setMinimum(0);
buildSceneProgressBar->setMaximum(m_numFrames - 1);
buildSceneProgressBar->setValue(0);
buildSceneProgressBar->move(600, 500);
buildSceneProgressBar->setWindowTitle("Building Schematic...");
buildSceneProgressBar->show();
for (int i = 0; i < m_numFrames; ++i, m_r += m_stepd) {
buildSceneProgressBar->setValue(i);
if (rs.m_stereoscopic)
scene->shiftCameraX(-rs.m_stereoscopicShift / 2);
TFxPair fx;
fx.m_frameA = buildSceneFx(scene, m_r, rs.m_shrinkX, isPreview);
if (fieldRendering && !isPreview)
fx.m_frameB = buildSceneFx(scene, m_r + 0.5 / m_timeStretchFactor, rs.m_shrinkX, isPreview);
else if (rs.m_stereoscopic) {
scene->shiftCameraX(rs.m_stereoscopicShift);
fx.m_frameB = buildSceneFx(scene, m_r + 0.5 / m_timeStretchFactor, rs.m_shrinkX, isPreview);
scene->shiftCameraX(-rs.m_stereoscopicShift / 2);
} else
fx.m_frameB = TRasterFxP();
/*-- movieRendererにフレーム毎のFxを登録 --*/
//.........这里部分代码省略.........