本文整理汇总了C++中QStatusBar::show方法的典型用法代码示例。如果您正苦于以下问题:C++ QStatusBar::show方法的具体用法?C++ QStatusBar::show怎么用?C++ QStatusBar::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QStatusBar
的用法示例。
在下文中一共展示了QStatusBar::show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addStatus
void MainWindow::addStatus(QWidget *w, bool)
{
QStatusBar *status = statusBar();
w->reparent(status, QPoint());
statusWidgets.push_back(w);
status->addWidget(w, true);
w->show();
status->show();
setGrip();
}
示例2: readFromConfig
void MainWindow::readFromConfig()
{
//switchLanguage(NULL);
/* read saved state */
readSettings(&settings, false);
toggleASQLow(ui->checkBox_asq_detectLow->isChecked());
toggleASQHigh(ui->checkBox_asq_detectHigh->isChecked());
toggleTransmitPilot(ui->checkBox_transmitter_pilot->isChecked());
toggleTransmitRds(ui->checkBox_transmitter_rds->isChecked());
toggleTransmitEnabled(ui->checkBox_transmitter_enabled->isChecked());
toggleRDSaf(ui->checkBox_rds_useaf->isChecked());
toggleRDSfifo(ui->checkBox_rds_fifo->isChecked());
toggleRDSPSVisibility(ui->spinBox_rds_ps_msgs->value());
UpdateRDSRTFileEnabled(ui->checkBox_rds_title_file->isChecked());
UpdateRDSRTPlusEnabled();
//updateHTTPListener();
createLanguageMenu();
ui->actionSelect_Language->setMenu(languageMenu);
setupTrayIcon();
SetWindowMode(!ui->checkBox_mini_mode->isChecked());
SetAudioCompLimPresetByParams();
/* actions for querier */
if(ui->checkBox_rds_time->isChecked()) {
querier->rdsInterval = ui->spinBox_rds_time_int->value() * 1000;
}
/* try to connect */
toggleConnection(false, false);
if(ui->checkBox_sw_autoconnect->isChecked())
querier->timer.start();
else {
QStatusBar *status = statusBar();
status->showMessage(tr("Default config editing mode..."));
status->show();
}
this->adjustSize();
this->resize(1,1);
this->updateGeometry();
qDebug() << __FUNCTION__;
}
示例3: QMainWindow
ExternalHelpWindow::ExternalHelpWindow(QWidget *parent)
: QMainWindow(parent)
{
QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String(Help::Constants::ID_MODE_HELP));
const QVariant geometry = settings->value(QLatin1String("geometry"));
if (geometry.isValid())
restoreGeometry(geometry.toByteArray());
else
resize(640, 480);
settings->endGroup();
QAction *action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I));
connect(action, SIGNAL(triggered()), this, SIGNAL(activateIndex()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C));
connect(action, SIGNAL(triggered()), this, SIGNAL(activateContents()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Slash));
connect(action, SIGNAL(triggered()), this, SIGNAL(activateSearch()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
connect(action, SIGNAL(triggered()), this, SIGNAL(activateBookmarks()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_O));
connect(action, SIGNAL(triggered()), this, SIGNAL(activateOpenPages()));
addAction(action);
CentralWidget *centralWidget = CentralWidget::instance();
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus));
connect(action, SIGNAL(triggered()), centralWidget, SLOT(zoomIn()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus));
connect(action, SIGNAL(triggered()), centralWidget, SLOT(zoomOut()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_M));
connect(action, SIGNAL(triggered()), this, SIGNAL(addBookmark()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_C));
connect(action, SIGNAL(triggered()), centralWidget, SLOT(copy()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_P));
connect(action, SIGNAL(triggered()), centralWidget, SLOT(print()));
addAction(action);
action = new QAction(this);
action->setShortcut(QKeySequence::Back);
action->setEnabled(centralWidget->isBackwardAvailable());
connect(action, SIGNAL(triggered()), centralWidget, SLOT(backward()));
connect(centralWidget, SIGNAL(backwardAvailable(bool)), action,
SLOT(setEnabled(bool)));
action = new QAction(this);
action->setShortcut(QKeySequence::Forward);
action->setEnabled(centralWidget->isForwardAvailable());
connect(action, SIGNAL(triggered()), centralWidget, SLOT(forward()));
connect(centralWidget, SIGNAL(forwardAvailable(bool)), action,
SLOT(setEnabled(bool)));
QAction *reset = new QAction(this);
connect(reset, SIGNAL(triggered()), centralWidget, SLOT(resetZoom()));
addAction(reset);
QAction *ctrlTab = new QAction(this);
connect(ctrlTab, SIGNAL(triggered()), &OpenPagesManager::instance(),
SLOT(gotoPreviousPage()));
addAction(ctrlTab);
QAction *ctrlShiftTab = new QAction(this);
connect(ctrlShiftTab, SIGNAL(triggered()), &OpenPagesManager::instance(),
SLOT(gotoNextPage()));
addAction(ctrlShiftTab);
action = new QAction(QIcon(QLatin1String(Core::Constants::ICON_TOGGLE_SIDEBAR)),
tr("Show Sidebar"), this);
connect(action, SIGNAL(triggered()), this, SIGNAL(showHideSidebar()));
if (Utils::HostOsInfo::isMacHost()) {
reset->setShortcut(QKeySequence(Qt::ALT + Qt::Key_0));
//.........这里部分代码省略.........
示例4: RedrawEverything
void MainWindow::RedrawEverything(bool bFound)
{
int ret, transmitting;
char cpuid[32];
char rev[32];
QStatusBar *status = statusBar();
qDebug() << __FUNCTION__;
fmtxEEPROMInfoClean();
liveEditingEnabled=false;
querier->is_ready=false;
deviceStatus=bFound;
toggleConnection(bFound, false);
if(!bFound) {
querier->is_ready=ui->checkBox_sw_autoconnect->isChecked();
if(!ui->checkBox_sw_autoconnect->isChecked())
querier->timer.stop();
qDebug() << "frontend flagged as" << bFound << " returning.";
if(!is_normal || !this->isVisible())
trayIcon->showMessage(tr("FmStick disconnected"),
tr("Device disconnected!"),
QSystemTrayIcon::Information, 5 * 1000);
return;
}
status->showMessage(tr("(Re)Reading frontend info..."), 10000);
status->show();
cpuid[0] = '\0';
rev[0] = '\0';
querier->HidAccessMutex.lock();
ret = fmtxIoAppIdString(cpuid, rev);
querier->HidAccessMutex.unlock();
if(ret!=FMTX_MODE_OK) {
qDebug() << "can't get id string";
goto redraw_err;
}
qDebug() << "got CPU ID: "<<QString(cpuid)<<" rev.:"<<QString(rev);
ui->lineEdit_hw_id_cpuid->setText(QString(cpuid));
ui->lineEdit_hw_id_cpufwid->setText(QString(rev));
status->showMessage(tr("Reading EEPROM..."), 10000);
status->show();
qDebug() << "Reading EEPROM...";
querier->HidAccessMutex.lock();
fmtxCmdSpecial = FMTX_SPECIAL_EEPROM; ///< now work with eeprom instead of frontend
ret=fmtxEEPROMReadConfig();
fmtxCmdSpecial = FMTX_SPECIAL_FRONTEND;
querier->HidAccessMutex.unlock();
ui->checkBox_hw_run_txAtPowerUp->blockSignals(true);
ui->checkBox_hw_run_txAtPowerUp->setChecked(fmtxEEPROMGetStartupFlag());
ui->checkBox_hw_run_txAtPowerUp->blockSignals(false);
if(ret==FMTX_MODE_POWER_DOWN) {
qDebug() << "EEPROM is empty yet!";
} else if(ret!=FMTX_MODE_OK) {
qDebug() << "Can't read EEPROM";
goto redraw_err;
}
qDebug() << "EEPROM Readed..";
transmitting = 0;
querier->HidAccessMutex.lock();
ret = fmtxIoAppFeGetMode(&transmitting);
querier->HidAccessMutex.unlock();
qDebug() << "Frontend mode: " << ret << "transmitting: " << transmitting;
if(ret == FMTX_MODE_POWER_DOWN){
qDebug() << "Frontend powered down!";
ret = SetFrontendPowerUp();
}
if(ret!=FMTX_MODE_POWER_UP && ret!=FMTX_MODE_TRANSMITTING) {
qDebug() << "Frontend not found..";
SetTransmitIcon(ICON_WARN);
goto redraw_err;
}
if(transmitting) {
qDebug() << "Already transmitting!";
SetTransmitIcon(ICON_TX);
}
/* needed to detect if hardware supports rds */
querier->HidAccessMutex.lock();
DisplayFirmwareInfo();
querier->HidAccessMutex.unlock();
if(fmtxCmdStatus!=FMTX_MODE_OK)
goto redraw_err;
if(ui->checkBox_rewriteCfg->isChecked()) {
qDebug() << "Forcing configuration from software, instead of hardware!";
status->showMessage("Writing running config...", 10000);
status->show();
if(SetFrontendParams()!=FMTX_MODE_OK)
goto redraw_err;
//hack for digital audio
//.........这里部分代码省略.........