void SettingsDialog::accept() { saveToSettings(); // Due to a bug in Qt <= 4.5.1, enabling/disabling cache requires the browser to be restarted. if (QLatin1String(qVersion()) <= QLatin1String("4.5.1") && networkCache->isChecked() != m_cacheEnabled) { QMessageBox::information(this, tr("Restart required"), tr("The network cache configuration has changed. " "So that it can be taken into account, the browser has to be restarted.")); } QDialog::accept(); }
MaraServerWindow::MaraServerWindow() : QMainWindow() { setupUi(this); setWindowIcon(QIcon(":images/MaraServer.ico")); setObjectName("MaraServerWindow"); qteConsole->setFont(QFont("Courier New", 8)); _hidden = false; _wasMaximized = false; setWindowTitle(QString("Mara Server 2.2.7 - Qt %1").arg(qVersion())); }
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); QString text = QString("<h1>%1</h1>QT v.%2<br>bzlib v.%3") .arg(CommonData::getInstance()->getAppId()) .arg(qVersion()) .arg(BZ2_bzlibVersion()); this->ui->text->setText(text); }
/*! Returns the version of QSystemInfo::Version \a type, with optional platform dependent \a parameter as a string. In case of error or not available, an empty string is returned. */ QString QSystemInfo::version(QSystemInfo::Version type, const QString ¶meter) { switch(type) { case QSystemInfo::QtMobility: return QLatin1String(QTM_VERSION_STR); case QSystemInfo::QtCore: return QString(qVersion()); default: return sysinfoPrivate()->version(type, parameter); } }
QtAboutWidget::QtAboutWidget() : QDialog() { #ifndef Q_OS_MAC setWindowTitle(QString(tr("About %1")).arg("Swift")); #endif setWindowIcon(QIcon(":/logo-icon-16.png")); resize(180, 240); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setAlignment(Qt::AlignHCenter); setLayout(mainLayout); QLabel* iconLabel = new QLabel(this); iconLabel->setPixmap(QIcon(":/logo-shaded-text.256.png").pixmap(90, 90)); iconLabel->setAlignment(Qt::AlignHCenter); mainLayout->addWidget(iconLabel); QLabel* appNameLabel = new QLabel("<center><font size='+1'><b>" + QCoreApplication::applicationName() + "</b></font></center>", this); mainLayout->addWidget(appNameLabel); QLabel* versionLabel = new QLabel(QString("<center><font size='-1'>") + tr("Version %1").arg(QCoreApplication::applicationVersion()) + "</font></center>", this); mainLayout->addWidget(versionLabel); QString buildString = QString("<center><font size='-1'>") + QString(tr("Built with Qt %1")).arg(QT_VERSION_STR); buildString += QString("<br/>") + QString(tr("Running with Qt %1")).arg(qVersion()); buildString += "</font></center>"; QLabel* buildLabel = new QLabel(buildString, this); mainLayout->addWidget(buildLabel); if (QCoreApplication::translate("TRANSLATION_INFO", "TRANSLATION_AUTHOR") != "TRANSLATION_AUTHOR") { mainLayout->addWidget(new QLabel(QString("<center><font size='-1'>") + QString(tr("Using the English translation by\n%1")).arg(QCoreApplication::translate("TRANSLATION_INFO", "TRANSLATION_AUTHOR")).replace("\n", "<br/>") + "</font></center>", this)); } QCoreApplication::translate("TRANSLATION_INFO", "TRANSLATION_LICENSE", "This string contains the license under which this translation is licensed. We ask you to license the translation under the BSD license. Please read http://www.opensource.org/licenses/bsd-license.php, and if you agree to release your translation under this license, use the following (untranslated) text: 'This translation is licensed under the BSD License. See http://www.opensource.org/licenses/bsd-license.php'"); #if defined(SWIFTEN_PLATFORM_WINDOWS) || defined(SWIFTEN_PLATFORM_MACOSX) QPushButton* licenseButton = new QPushButton(tr("View License"), this); mainLayout->addWidget(licenseButton); connect(licenseButton, SIGNAL(clicked()), this, SLOT(handleLicenseClicked())); #else // Some Linux desktops have dialog window decorations without close window buttons. // This code adds a dedicated button to close the about window dialog. QHBoxLayout* buttonLayout = new QHBoxLayout(); mainLayout->addLayout(buttonLayout); QPushButton* licenseButton = new QPushButton(tr("View License"), this); buttonLayout->addWidget(licenseButton); connect(licenseButton, SIGNAL(clicked()), this, SLOT(handleLicenseClicked())); buttonLayout->addItem(new QSpacerItem(20,20)); QPushButton* closeButton = new QPushButton(tr("Close"), this); buttonLayout->addWidget(closeButton); connect(closeButton, SIGNAL(clicked()), this, SLOT(accept())); #endif setFixedSize(minimumSizeHint()); }
void MainWindow::showAbout() { QString info; info += QString("QConnect %1\n\n").arg(VERSION); info += "Simple TCP/IP server & client.\n"; info += "Author: Kuba Sejdak\n"; info += "Contact: [email protected]\n\n"; info += QString("Compiled with: Qt %1").arg(qVersion()); QMessageBox::information(this, "About QConnect", info, QMessageBox::Ok); }
void tableWidgetUpdateBug(QTableWidget* table) { //this is for a bug appeared in Qt 4.5.3. The bug seems to be solved in Qt subsequent versions. QString buggy1=QString("4.5.3"); QString crtVersion=qVersion(); if(crtVersion==buggy1){ if(table->viewport()) table->viewport()->update(); } }
int main(int argc, char *argv[]) { qRegisterMetaType<CurrentStatusUpdate>("CurrentStatusUpdate"); qRegisterMetaType<Items>("Items"); qRegisterMetaType<std::vector<std::string>>("std::vector<std::string>"); qRegisterMetaType<QsLogging::Level>("QsLogging::Level"); QLocale::setDefault(QLocale::C); //#if defined(CRASHRPT) && !defined(DEBUG) // CR_INSTALL_INFOW info; // memset(&info, 0, sizeof(CR_INSTALL_INFOW)); // info.cb = sizeof(CR_INSTALL_INFOW); // info.pszAppName = L"Acquisition"; // info.pszAppVersion = L"0.0"; // info.pszUrl = L"https://xyz.is/acquisition/utils/crashrpt.php"; // CrAutoInstallHelper cr_install_helper(&info); //#endif InitModlist(); QApplication a(argc, argv); Filesystem::Init(); QCommandLineParser parser; QCommandLineOption option_data_dir("data-dir", "Where to save Acquisition data.", "data-dir"); parser.addOption(option_data_dir); parser.process(a); if (parser.isSet(option_data_dir)) Filesystem::SetUserDir(parser.value(option_data_dir).toStdString()); QsLogging::Logger& logger = QsLogging::Logger::instance(); logger.setLoggingLevel(QsLogging::InfoLevel); const QString sLogPath(QDir(Filesystem::UserDir().c_str()).filePath("log.txt")); QsLogging::DestinationPtr fileDestination( QsLogging::DestinationFactory::MakeFileDestination(sLogPath, true, 10 * 1024 * 1024, 0) ); QsLogging::DestinationPtr debugDestination( QsLogging::DestinationFactory::MakeDebugOutputDestination() ); logger.addDestination(debugDestination); logger.addDestination(fileDestination); qApp->setStyle(QStyleFactory::create("Fusion")); QLOG_INFO() << "--------------------------------------------------------------------------------"; QLOG_INFO() << "Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); LoginDialog login(std::make_unique<Application>()); login.show(); return a.exec(); }
void initLogger(QsLogging::Level logLevel) { QsLogging::Logger &logger = QsLogging::Logger::instance(); QsLogging::DestinationPtr debugDestination( QsLogging::DestinationFactory::MakeDebugOutputDestination() ); logger.addDestination(debugDestination); QLOG_INFO() << "dbus_modbustcp" << "v" VERSION << "started"; QLOG_INFO() << "Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); QLOG_INFO() << "Built on" << __DATE__ << "at" << __TIME__; logger.setLoggingLevel(logLevel); }
QNetworkReply* NetworkAccessManager::createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) { QString agentStr = QString::fromLatin1("%1/%2 (QNetworkAccessManager %3; %4; %5; %6 bit)") .arg(QCoreApplication::applicationName(), QCoreApplication::applicationVersion(), QLatin1String(qVersion()), getOsString(), QLocale::system().name()) .arg(QSysInfo::WordSize); QNetworkRequest req(request); req.setRawHeader("User-Agent", agentStr.toLatin1()); return QNetworkAccessManager::createRequest(op, req, outgoingData); }
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) : QDialog( parent ) { setupUi( this ); setAttribute( Qt::WA_DeleteOnClose, true ); QString info; QTextStream s( &info ); s << "<b>" << tr("Locale (time-, number format / codepage):") << "</b> "; QLocale::Language language = QLocale::system().language(); QString locale = (language == QLocale::C ? "English/United States" : QLocale::languageToString( language ) ); CPINFOEX CPInfoEx; if ( GetCPInfoEx( GetConsoleCP(), 0, &CPInfoEx ) != 0 ) locale.append( " / " ).append( CPInfoEx.CodePageName ); s << locale << "<br />"; s << "<b>" << tr("User rights: ") << "</b>" << getUserRights() << "<br />"; QStringList base = Common::packages( QStringList() << "Eesti ID kaardi tarkvara", false ); if ( !base.isEmpty() ) s << "<b>" << tr("Base version:") << "</b> " << base.join( "<br />" ) << "<br />"; s << "<b>" << tr("ID-card utility version:") << "</b> "<< QCoreApplication::applicationVersion() << "<br />"; s << "<b>" << tr("OS:") << "</b> " << Common::applicationOs() << "<br />"; s << "<b>" << tr("CPU:") << "</b> " << getProcessor() << "<br /><br />"; s << "<b>" << tr("Library paths:") << "</b> " << QCoreApplication::libraryPaths().join( ";" ) << "<br />"; s << "<b>" << tr("Libraries") << ":</b><br />"; s << getLibVersion( "digidoc" ) << "<br />"; s << getLibVersion( "digidocpp" ) << "<br />"; s << getLibVersion( "advapi32" ) << "<br />"; s << getLibVersion( "crypt32" ) << "<br />"; s << getLibVersion( "winscard" ) << "<br />"; s << getLibVersion( "esteidcsp|esteidcm" ) << "<br />"; s << getLibVersion( "libeay32" ) << "<br />"; s << getLibVersion( "ssleay32" ) << "<br />"; s << getLibVersion( "opensc-pkcs11" ) << "<br />"; s << "QT (" << qVersion() << ")<br />" << "<br />"; s << "<b>" << tr("Smart Card service status: ") << "</b>" << " " << (isPCSCRunning() ? tr("Running") : tr("Not running")) << "<br /><br />"; s << "<b>" << tr("Card readers") << ":</b><br />" << getReaderInfo() << "<br />"; QStringList browsers = Common::packages( QStringList() << "Mozilla" << "Google Chrome" ); QSettings reg( "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer", QSettings::NativeFormat ); browsers << QString( "Internet Explorer (%1)" ).arg( reg.value( "Version" ).toString() ); s << "<b>" << tr("Browsers:") << "</b><br />" << browsers.join( "<br />" ) << "<br /><br />"; diagnosticsText->setHtml( info ); details = buttonBox->addButton( tr( "More info" ), QDialogButtonBox::HelpRole ); }
static void printVersion() { QTextStream str(stdout); str << qApp->applicationName() << " version " << versionString() << endl << "Using Qt version " << qVersion() << endl << "GPL v3 or any later" << endl; // foreach (Plugin *plugin, p->plugins) { // PluginInfo info = plugin->info(); // str << " " << info.name() << ' ' << formatVersion(info.version()) // << ' ' << info.description() << '\n'; // } }
void initLogger(QsLogging::Level logLevel) { // init the logging mechanism QsLogging::DestinationPtr debugDestination( QsLogging::DestinationFactory::MakeDebugOutputDestination() ); logger.addDestination(debugDestination); QLOG_INFO() << "dbus_qwacs" << "v" VERSION << "started"; QLOG_INFO() << "Built with Qt" << QT_VERSION_STR << "running on" << qVersion(); QLOG_INFO() << "Built on" << __DATE__ << "at" << __TIME__; logger.setLoggingLevel(logLevel); }
AboutDialog::AboutDialog(QWidget* parent_) : QDialog(parent_), m_ui(new Ui::AboutDialog) { m_ui->setupUi(this); QString html("<html><head/><body><p>" \ "<span style=\" font-size:%1pt; font-weight:600;\">%2</span>" \ "</p></body></html>"); m_ui->version->setText(html.arg("20").arg(MoleQueue_VERSION)); m_ui->qtVersion->setText(html.arg("10").arg(qVersion())); }
void QTestLightXmlStreamer::output(QTestElement *element) const { QTestCharBuffer buf; QTest::qt_asprintf(&buf, "<Environment>\n <QtVersion>%s</QtVersion>\n <QTestVersion>%s</QTestVersion>\n", qVersion(), QTEST_VERSION_STR ); outputString(buf.constData()); QTest::qt_asprintf(&buf, "</Environment>\n"); outputString(buf.constData()); QTestBasicStreamer::output(element); }
GuiApplicationImpl::GuiApplicationImpl() : #ifndef NDEBUG owner{std::this_thread::get_id()}, #endif app{argc, &argv} { // Set locale back to POSIX for the decimal point parsing (see qcoreapplication.html#locale-settings). std::locale::global(std::locale().combine<std::numpunct<char>>(std::locale::classic())); qInfo() << "Compiled with Qt" << QT_VERSION_STR << "and run with Qt" << qVersion(); }
void QTestLogger::stopLogging() { QTestElement *iterator = listOfTestcases; if(format == TLF_XunitXml ){ char buf[10]; currentLogElement = new QTestElement(QTest::LET_TestSuite); currentLogElement->addAttribute(QTest::AI_Name, QTestResult::currentTestObjectName()); QTest::qt_snprintf(buf, sizeof(buf), "%i", testCounter); currentLogElement->addAttribute(QTest::AI_Tests, buf); QTest::qt_snprintf(buf, sizeof(buf), "%i", failureCounter); currentLogElement->addAttribute(QTest::AI_Failures, buf); QTest::qt_snprintf(buf, sizeof(buf), "%i", errorCounter); currentLogElement->addAttribute(QTest::AI_Errors, buf); QTestElement *property; QTestElement *properties = new QTestElement(QTest::LET_Properties); property = new QTestElement(QTest::LET_Property); property->addAttribute(QTest::AI_Name, "QTestVersion"); property->addAttribute(QTest::AI_PropertyValue, QTEST_VERSION_STR); properties->addLogElement(property); property = new QTestElement(QTest::LET_Property); property->addAttribute(QTest::AI_Name, "QtVersion"); property->addAttribute(QTest::AI_PropertyValue, qVersion()); properties->addLogElement(property); currentLogElement->addLogElement(properties); currentLogElement->addLogElement(iterator); /* For correct indenting, make sure every testcase knows its parent */ QTestElement* testcase = iterator; while (testcase) { testcase->setParent(currentLogElement); testcase = testcase->nextElement(); } currentLogElement->addLogElement(errorLogElement); QTestElement *it = currentLogElement; logFormatter->output(it); }else{ logFormatter->output(iterator); } logFormatter->stopStreaming(); }
qint64 SQLiteModDbi::getNearestUserModStepVersion(const U2DataId &masterObjId, qint64 version, U2OpStatus &os) { SQLiteReadQuery qVersion("SELECT MAX(version) FROM UserModStep WHERE object = ?1 AND version <= ?2", db, os); qVersion.bindDataId(1, masterObjId); qVersion.bindInt64(2, version); qint64 userStepVersion = version; if (qVersion.step()) { userStepVersion = qVersion.getInt64(0); } SAFE_POINT_OP(os, userStepVersion); return userStepVersion; }
bool QmlProfilerApplication::parseArguments() { for (int argPos = 1; argPos < arguments().size(); ++argPos) { const QString arg = arguments().at(argPos); if (arg == QLatin1String("-attach") || arg == QLatin1String("-a")) { if (argPos + 1 == arguments().size()) { return false; } m_hostName = arguments().at(++argPos); m_runMode = AttachMode; } else if (arg == QLatin1String("-port") || arg == QLatin1String("-p")) { if (argPos + 1 == arguments().size()) { return false; } const QString portStr = arguments().at(++argPos); bool isNumber; m_port = portStr.toUShort(&isNumber); if (!isNumber) { logError(QString("'%1' is not a valid port").arg(portStr)); return false; } } else if (arg == QLatin1String("-fromStart")) { m_qmlProfilerClient.setRecording(true); m_v8profilerClient.setRecording(true); } else if (arg == QLatin1String("-help") || arg == QLatin1String("-h") || arg == QLatin1String("/h") || arg == QLatin1String("/?")) { return false; } else if (arg == QLatin1String("-verbose") || arg == QLatin1String("-v")) { m_verbose = true; } else if (arg == QLatin1String("-version")) { print(QString("QML Profiler based on Qt %1.").arg(qVersion())); ::exit(1); return false; } else { if (m_programPath.isEmpty()) { m_programPath = arg; m_tracePrefix = QFileInfo(m_programPath).fileName(); } else { m_programArguments << arg; } } } if (m_runMode == LaunchMode && m_programPath.isEmpty()) return false; if (m_runMode == AttachMode && !m_programPath.isEmpty()) return false; return true; }
long GalleryUtil::GetNaturalRotation(void *exifData) { long rotateAngle = 0; #ifdef EXIF_SUPPORT // Qt 5.4.1 automatically orientates images according to their EXIF data if (strcmp(qVersion(), "5.4.1") == 0) return 0; ExifData *data = (ExifData *)exifData; if (!data) return 0; for (int i = 0; i < EXIF_IFD_COUNT; i++) { ExifEntry *entry = exif_content_get_entry(data->ifd[i], EXIF_TAG_ORIENTATION); ExifByteOrder byteorder = exif_data_get_byte_order(data); if (entry) { ExifShort v_short = exif_get_short(entry->data, byteorder); LOG(VB_GENERAL, LOG_DEBUG, QString("Exif entry=%1").arg(v_short)); /* See http://sylvana.net/jpegcrop/exif_orientation.html*/ switch (v_short) { case 3: rotateAngle = 180; break; case 6: rotateAngle = 90; break; case 8: rotateAngle = -90; break; default: rotateAngle = 0; break; } break; } } #else // Shut the compiler up about the unused argument (void)exifData; #endif // EXIF_SUPPORT return rotateAngle; }
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); ui->lAboutText->setText(ui->lAboutText->text() .arg(APPLICATION_NAME) .arg(VERSION_MAJOR) .arg(VERSION_MINOR) .arg(DEVELOPER_BUILD ? "beta" : "") .arg(qVersion()) .arg(FEMTO_TEST_VERSION)); }
void MainWindow::about() { QString text = "Copyright © 2015 by University of Stuttgart (VISUS).\n" "All rights reserved.\n" "\n" "Based on OpenCV %2 and Qt %3.\n" "\n" "Build on %1."; QString build = QString(__DATE__) + " " + QString(__TIME__); QString cvVersion(CV_VERSION); QMessageBox::about(this, "About", text.arg(build, cvVersion, qVersion())); }
int Utility::qtVersion() const { QString qtver(qVersion()); QStringList vlist = qtver.split("."); if (vlist.length() >= 3){ int major = vlist.at(0).toInt(); int minor = vlist.at(1).toInt(); int patch = vlist.at(2).toInt(); return (major << 16) + (minor << 8) + patch; } else { return 0; } }
void LocalView::slot_dir_nav_prefix_changed(const QString &prefix) { // q_debug()<<""<<prefix; QStringList matches; QModelIndex sourceIndex = this->model->index(prefix); QModelIndex currIndex; if (prefix == "") { sourceIndex = this->model->index(0, 0, QModelIndex()); } else if (prefix.length() > 1 && prefix.toUpper().at(0) >= 'A' && prefix.toUpper().at(0) <= 'Z' && prefix.at(1) == ':') { // leave not changed }else if (!sourceIndex.isValid()) { int pos = prefix.lastIndexOf('/'); if (pos == -1) { pos = prefix.lastIndexOf('\\'); } if (pos == -1) { // how deal this case Q_ASSERT(pos >= 0); } sourceIndex = this->model->index(prefix.left(prefix.length() - pos)); } if (sourceIndex.isValid()) { if (this->model->canFetchMore(sourceIndex)) { while (this->model->canFetchMore(sourceIndex)) { this->is_dir_complete_request = true; this->dir_complete_request_prefix = prefix; this->model->fetchMore(sourceIndex); } // sience qt < 4.7 has no directoryLoaded signal, so we should execute now if > 0 if (strcmp(qVersion(), "4.7.0") < 0) { // QTimer::singleShot(this, SLOT( } } else { int rc = this->model->rowCount(sourceIndex); q_debug()<<"lazy load dir rows:"<<rc; for (int i = rc - 1; i >= 0; --i) { currIndex = this->model->index(i, 0, sourceIndex); if (this->model->isDir(currIndex)) { matches << this->model->filePath(currIndex); } } this->uiw->widget->onSetCompleteList(prefix, matches); } } else { // any operation for this case??? q_debug()<<"any operation for this case???"<<prefix; } }
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent ) : QDialog( parent ) { setupUi( this ); setAttribute( Qt::WA_DeleteOnClose, true ); QString info; QTextStream s( &info ); s << "<b>" << tr("Locale (time-, number format / codepage):") << "</b> "; QLocale::Language language = QLocale::system().language(); QString locale = QString( "%1 / ").arg( language == QLocale::C ? "English/United States" : QLocale::languageToString( language ) ); #ifdef Q_OS_MAC locale.append( runProcess( "sh -c \"echo $LC_CTYPE\"" ) ); #else locale.append( runProcess( "sh -c \"echo $LANG\"" ) ); #endif s << locale << "<br /><br />"; QStringList package = Common::packages( QStringList() << "estonianidcard", false ); QStringList utility = Common::packages( QStringList() << "qesteidutil", false ); if ( !package.isEmpty() ) s << "<b>" << tr("Base version:") << "</b> " << package.first() << "<br />"; if ( !utility.isEmpty() ) s << "<b>" << tr("ID-card utility version:") << "</b> " << utility.first() << "<br />"; s << "<b>" << tr("OS:") << "</b> " << Common::applicationOs() << "<br />"; s << "<b>" << tr("CPU:") << "</b> " << getProcessor() << "<br /><br />"; s << "<b>" << tr("Library paths:") << "</b> " << QCoreApplication::libraryPaths().join( ";" ) << "<br />"; s << "<b>" << tr("Libraries") << ":</b><br />"; s << Common::packages( QStringList() << "libdigidoc" << "libdigidocpp" ).join( "<br />" ) << "<br />"; #ifdef Q_OS_MAC s << runProcess( "/Library/OpenSC/bin/opensc-tool", QStringList() << "-i" ) << "<br />"; #else s << Common::packages( QStringList() << "openssl" << "libpcsclite1" << "pcsc-lite" << "opensc" ).join( "<br />" ) << "<br />"; #endif s << "QT (" << qVersion() << ")<br />" << "<br />"; s << "<b>" << tr("PCSC service status: ") << "</b>" << " " << (isPCSCRunning() ? tr("Running") : tr("Not running")) << "<br /><br />"; s << "<b>" << tr("Card readers") << ":</b><br />" << getReaderInfo() << "<br />"; QStringList browsers = Common::packages( QStringList() << "chromium-browser" << "firefox" << "MozillaFirefox" << "Google Chrome" << "Firefox" << "Safari" ); if ( !browsers.isEmpty() ) s << "<b>" << tr("Browsers:") << "</b><br />" << browsers.join( "<br />" ) << "<br /><br />"; diagnosticsText->setHtml( info ); details = buttonBox->addButton( tr( "More info" ), QDialogButtonBox::HelpRole ); }
SkinConfigWidget::SkinConfigWidget(QWidget *parent, KLFPluginConfigAccess *conf) : QWidget(parent), config(conf), _modified(false) { KLF_DEBUG_BLOCK(KLF_FUNC_NAME) ; setupUi(this); if (klfVersionCompare(qVersion(), "4.5.0") >= 0) lblNoteQtVersion->hide(); connect(cbxSkin, SIGNAL(activated(int)), this, SLOT(skinSelected(int))); connect(btnRefresh, SIGNAL(clicked()), this, SLOT(refreshSkin())); // connect(btnInstallSkin, SIGNAL(clicked()), this, SLOT(installSkin())); }
void CAboutDialog::GatherTechInfo() { ui->TechData->insertRow(0); ui->TechData->setItem(0, 0, new QTableWidgetItem(tr("Debug build"))); #ifdef QT_DEBUG ui->TechData->setItem(0, 1, new QTableWidgetItem(tr("Yes"))); #else ui->TechData->setItem(0, 1, new QTableWidgetItem(tr("No"))); #endif ui->TechData->insertRow(0); ui->TechData->setItem(0, 0, new QTableWidgetItem(tr("Qt version"))); ui->TechData->setItem(0, 1, new QTableWidgetItem(qVersion())); }
AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); #ifdef Q_OS_WIN QString os = tr("Windows"); #endif #ifdef Q_OS_LINUX QString os = tr("GNU/Linux"); #endif #ifdef Q_OS_MAC QString os = tr("Mac"); #endif QString buildName = ACT_BUILD_NAME; if(buildName.isEmpty()) buildName.clear(); else buildName = " - " ACT_BUILD_NAME; QString message = tr("<img src=':/icons/logo.png'><h2>Actiona %1%2</h2>").arg(Global::ACTIONA_VERSION.toString()).arg(buildName); message += " 2008-2014 Jonathan \"Jmgr\" Mercier-Ganady <a href='mailto:[email protected]'>[email protected]</a><br/><br/>"; message += tr("<i>Emulates clics, key presses and other actions</i><br/><br/>Using Qt %1 (runtime %2) under %3 (%4 bit)<br/>Build date: %5 %6</center><br/>") .arg(QT_VERSION_STR) .arg(qVersion()) .arg(os) .arg(QSysInfo::WordSize) .arg(__DATE__) .arg(__TIME__); ui->titleLabel->setText(message); mComboBoxes.append(ui->act3Prog); mComboBoxes.append(ui->act3Ideas); mComboBoxes.append(ui->act3Donators); mComboBoxes.append(ui->act3Art); mComboBoxes.append(ui->act3Pack); mComboBoxes.append(ui->act3Documentation); mComboBoxes.append(ui->act2Prog); mComboBoxes.append(ui->act2Ideas); mComboBoxes.append(ui->act2Donators); mComboBoxes.append(ui->act2Art); QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(animate())); timer->start(1500); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setApplicationName("Qvernote"); QTranslator aTranslator; aTranslator.load("po/qvernote_" + QLocale::system().name()); a.installTranslator(&aTranslator); // Show Qt version qDebug() << "Qvernote: built with Qt" << QT_VERSION_STR << "running on" << qVersion(); Qvernote wndLoader; wndLoader.Init(); return a.exec(); }
aboutDialog::aboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::aboutDialog) { ui->setupUi(this); setWindowTitle(QString("About %1").arg(qApp->applicationName())); ui->textEdit->append(QString("Copyright © 2009-2011, Manjeet Dahiya\n")); ui->textEdit->append(qApp->applicationName() + " " + qApp->applicationVersion()); ui->textEdit->append(QString("\nBased on:")); ui->textEdit->append(QString("QXmpp %1").arg(QXmppVersion())); ui->textEdit->append(QString("Qt %1 [built-with]").arg(qVersion())); ui->textEdit->append(QString("Qt %1 [running-with]").arg(QT_VERSION_STR)); }