QVariant Certificate::detailResult(Certificate::Details detail) const { switch(detail) { case Details::EXPIRATION_DATE : return expirationDate (); case Details::ACTIVATION_DATE : return activationDate (); case Details::REQUIRE_PRIVATE_KEY_PASSWORD : return requirePrivateKeyPassword (); case Details::PUBLIC_SIGNATURE : return publicSignature (); case Details::VERSION_NUMBER : return versionNumber (); case Details::SERIAL_NUMBER : return serialNumber (); case Details::ISSUER : return issuer (); case Details::SUBJECT_KEY_ALGORITHM : return subjectKeyAlgorithm (); case Details::CN : return cn (); case Details::N : return n (); case Details::O : return o (); case Details::SIGNATURE_ALGORITHM : return signatureAlgorithm (); case Details::MD5_FINGERPRINT : return md5Fingerprint (); case Details::SHA1_FINGERPRINT : return sha1Fingerprint (); case Details::PUBLIC_KEY_ID : return publicKeyId (); case Details::ISSUER_DN : return issuerDn (); case Details::NEXT_EXPECTED_UPDATE_DATE : return nextExpectedUpdateDate (); case Details::OUTGOING_SERVER : return outgoingServer (); case Details::COUNT__: Q_ASSERT(false); }; return QVariant(); }
int main(int argc,char *argv[]) { std::ofstream logfile; logfile.open("log.txt"); buw::LogManager::getInstance().addOutputStream(&logfile); // log file should be outputted in XML format buw::logMangerSettings settings; settings.outputAsXML = true; settings.colorConsoleOutput = true; buw::LogManager::getInstance().setSettings(settings); buw::LifetimeManager lm; if (buw::getBlueCoreRevisionVersion() < 1802) { BLUE_LOG_STREAM_EX("main", buw::eLogSeverityLevel::Error) << "Please switch to BlueFramework 0.4.1802 or newer!"; system("pause"); } if (buw::getBlueCoreRevisionVersion() != buw::VERSION_REVISION) { BLUE_LOG_STREAM_EX("main", buw::eLogSeverityLevel::Error) << "Invalid BlueCore DLL found!"; } if (!true) { compile(); return 0; } buw::LogManager::getInstance().LogCPUInfo(); buw::LogManager::getInstance().LogOSInfo(); buw::LogManager::getInstance().LogGPUInfo(); QApplication application(argc,argv); QApplication::setApplicationName("TUM Open Infra Platform 2014"); QApplication::setApplicationVersion("0.1.0"); QApplication::setOrganizationName("Technische Universitaet Muenchen Chair of Computational Modeling and Simulation"); QApplication::setOrganizationDomain("cms.bv.tum.de"); // Set this to your own appcast URL, of course FvUpdater::sharedUpdater()->SetFeedURL("http://vertexwahn.de/BlueInfrastructureCenter/Appcast.xml"); // Check for updates silently -- this will not block the initialization of // your application, just start a HTTP request and return immediately. FvUpdater::sharedUpdater()->CheckForUpdatesSilent(); std::string basePath = "Style/blueform.qss";//":Resources/Style/blueform.qss";// QFile styleSheet(basePath.c_str()); if (!styleSheet.open(QIODevice::ReadOnly)) { qWarning("Unable to open stylesheet"); } else { application.setStyleSheet(styleSheet.readAll()); } // check if we are in beta phase QDate expirationDate(2014, 4, 1); if ( expirationDate < QDate::currentDate() ) { QString desc = QString( "The Beta phase has ended. Please visit our website for a new version:<br/> <a href=\"https://www.cms.bgu.tum.de/de/component/content/article/31-forschung/projekte/397-tum-open-infra-platform\"><font color=\"#48B7E7\">http://www.cms.bgu.tum.de</font></a><br/>" ); QMessageBox::information(nullptr, "Beta Phase ended", desc ); return 0; } if (true) { try { BlueInfrastructureCenter::UserInterface::MainWindow mainWindow; mainWindow.setAttribute(Qt::WA_QuitOnClose); mainWindow.show(); return application.exec(); } catch (const buw::FileNotFoundException& e) { std::stringstream ss; ss << "An unexpected error occurred:\nCould not find file \"" << e.getFilename().c_str() << "\""; QMessageBox::information(nullptr, QApplication::applicationName(), ss.str().c_str() ); } } else { BlueInfrastructureCenter::UserInterface::CodeEditorWindow CodeEditor; CodeEditor.show(); return application.exec(); } }