• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setApplicationName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中setApplicationName函数的典型用法代码示例。如果您正苦于以下问题:C++ setApplicationName函数的具体用法?C++ setApplicationName怎么用?C++ setApplicationName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setApplicationName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: BaseApplication

Application::Application(const QString &id, int &argc, char **argv)
    : BaseApplication(id, argc, argv)
    , m_running(false)
    , m_shutdownAct(ShutdownDialogAction::Exit)
    , m_commandLineArgs(parseCommandLine(this->arguments()))
#ifndef DISABLE_WEBUI
    , m_webui(nullptr)
#endif
{
    qRegisterMetaType<Log::Msg>("Log::Msg");

    setApplicationName("qBittorrent");
    validateCommandLineParameters();

    QString profileDir = m_commandLineArgs.portableMode
        ? QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(DEFAULT_PORTABLE_MODE_PROFILE_DIR)
        : m_commandLineArgs.profileDir;

    Profile::initialize(profileDir, m_commandLineArgs.configurationName,
                        m_commandLineArgs.relativeFastresumePaths || m_commandLineArgs.portableMode);

    Logger::initInstance();
    SettingsStorage::initInstance();
    Preferences::initInstance();

    if (m_commandLineArgs.webUiPort > 0) // it will be -1 when user did not set any value
        Preferences::instance()->setWebUiPort(m_commandLineArgs.webUiPort);

    setApplicationName("qBittorrent");
    initializeTranslation();

#if !defined(DISABLE_GUI)
    setAttribute(Qt::AA_UseHighDpiPixmaps, true);  // opt-in to the high DPI pixmap support
    setQuitOnLastWindowClosed(false);
#endif

#if defined(Q_OS_WIN) && !defined(DISABLE_GUI)
    connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection);
#endif

    connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &)));
    connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup()));

    if (isFileLoggerEnabled())
        m_fileLogger = new FileLogger(fileLoggerPath(), isFileLoggerBackup(), fileLoggerMaxSize(), isFileLoggerDeleteOld(), fileLoggerAge(), static_cast<FileLogger::FileLogAgeType>(fileLoggerAgeType()));

    Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QBT_VERSION));
}
开发者ID:Gelmir,项目名称:qBittorrent,代码行数:48,代码来源:application.cpp


示例2: QApplication

IQmolApplication::IQmolApplication(int &argc, char **argv )
  : QApplication(argc, argv)
{
   setOrganizationDomain("iqmol.org");
   setApplicationName("IQmol");
   // Can't log anything yet as the logger hasn't been initialized
}
开发者ID:bjnano,项目名称:IQmol,代码行数:7,代码来源:IQmolApplication.C


示例3: QApplication

/**
  * Constructor
  */
BursarApp::BursarApp(int argc, char *argv[])
    : QApplication(argc, argv)
{
    // set application properties
    setApplicationName(APP_NAME);
    setApplicationVersion(APP_VERSION);

    // mac specific
#ifdef Q_WS_MAC
    // don't quit application when last window closes
    //setQuitOnLastWindowClosed(false);

    // create mac style menu
    //createMacStyleMenu();
#endif

    // create bursar document
    m_doc = new BurDoc(FULL);

    // create main window
    m_mainWindow = new MainWindow(m_doc);

#ifndef Q_WS_MAC
    // show main window
    m_mainWindow->show();
#endif
}
开发者ID:BackupTheBerlios,项目名称:bursar,代码行数:30,代码来源:bursarapp.cpp


示例4: QApplication

QkUiApplication::QkUiApplication(int& pArgc, char** pArgv, const QString& pCompanyName, const QString& pAppName)
    : QApplication(pArgc, pArgv)
{
    setApplicationName(pAppName);
    setOrganizationName(pCompanyName);
    initMyResource();
}
开发者ID:koloboid,项目名称:qk-cpp,代码行数:7,代码来源:qkuiapplication.cpp


示例5: QApplication

WiresharkApplication::WiresharkApplication(int &argc,  char **argv) :
    QApplication(argc, argv),
    initialized_(false),
    is_reloading_lua_(false),
    if_notifier_(NULL),
    active_captures_(0)
{
    wsApp = this;
    setApplicationName("Wireshark");

    Q_INIT_RESOURCE(about);
    Q_INIT_RESOURCE(i18n);
    Q_INIT_RESOURCE(layout);
    Q_INIT_RESOURCE(toolbar);
    Q_INIT_RESOURCE(wsicon);
    Q_INIT_RESOURCE(languages);

#ifdef Q_OS_WIN
    /* RichEd20.DLL is needed for native file dialog filter entries. */
    ws_load_library("riched20.dll");
#endif // Q_OS_WIN

#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
    setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif

    QList<int> icon_sizes = QList<int>() << 16 << 24 << 32 << 48 << 64 << 128 << 256 << 512 << 1024;
    foreach (int icon_size, icon_sizes) {
        QString icon_path = QString(":/wsicon/wsicon%1.png").arg(icon_size);
        normal_icon_.addFile(icon_path);
        icon_path = QString(":/wsicon/wsiconcap%1.png").arg(icon_size);
        capture_icon_.addFile(icon_path);
    }
开发者ID:Piping,项目名称:wireshark,代码行数:33,代码来源:wireshark_application.cpp


示例6: Libertine

/**
 * Constraucts a Libertine application wrapper object.
 * @param[in] argc  The count of the number of command-line arguments.
 * @param[in] argv  A vector of command-line arguments.
 *
 * Sets up the Libertine application from the command-line arguments,
 * environment variables, and configurations files and displays the GUI.
 */
Libertine::
Libertine(int argc, char* argv[])
: QGuiApplication(argc, argv)
, main_qml_source_file_(find_main_qml_source_file())
{
  setApplicationName(LIBERTINE_APPLICATION_NAME);
  setApplicationVersion(LIBERTINE_VERSION);
  config_.reset(new LibertineConfig(*this));
  qmlRegisterType<ContainerConfig>("Libertine", 1, 0, "ContainerConfig");
  qmlRegisterType<ContainerManagerWorker>("Libertine", 1, 0, "ContainerManagerWorker");
  qmlRegisterType<PasswordHelper>("Libertine", 1, 0, "PasswordHelper");

  initialize_python();

  if (main_qml_source_file_.isEmpty())
  {
    qWarning() << "Can not locate " << s_main_QML_source_file;
  }

  containers_ = new ContainerConfigList(config_.data(), this);
  container_apps_ = new ContainerAppsList(containers_, this);
  password_helper_ = new PasswordHelper();

  initialize_view();
  view_.show();
}
开发者ID:attente,项目名称:libertine,代码行数:34,代码来源:libertine.cpp


示例7: BaseApplication

Application::Application(const QString &id, int &argc, char **argv)
    : BaseApplication(id, argc, argv)
    , m_running(false)
#ifndef DISABLE_GUI
    , m_shutdownAct(ShutdownAction::None)
#endif
{
    Logger::initInstance();
    Preferences::initInstance();

#if defined(Q_OS_MACX) && !defined(DISABLE_GUI)
    if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_8) {
        // fix Mac OS X 10.9 (mavericks) font issue
        // https://bugreports.qt-project.org/browse/QTBUG-32789
        QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
    }
#endif
    setApplicationName("qBittorrent");
    initializeTranslation();
#ifndef DISABLE_GUI
    setStyleSheet("QStatusBar::item { border-width: 0; }");
    setQuitOnLastWindowClosed(false);
#ifdef Q_OS_WIN
    connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(shutdownCleanup(QSessionManager &)), Qt::DirectConnection);
#endif // Q_OS_WIN
#endif // DISABLE_GUI

    connect(this, SIGNAL(messageReceived(const QString &)), SLOT(processMessage(const QString &)));
    connect(this, SIGNAL(aboutToQuit()), SLOT(cleanup()));

    Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(VERSION));
}
开发者ID:JXPrime,项目名称:qBittorrent,代码行数:32,代码来源:application.cpp


示例8: QApplication

AgrosApplication::AgrosApplication(int& argc, char ** argv) : QApplication(argc, argv), m_scriptEngineRemote(NULL)
{
    setWindowIcon(icon("agros2d"));
    setApplicationVersion(versionString());
    setOrganizationName("hpfem.org");
    setOrganizationDomain("hpfem.org");
    setApplicationName("Agros2D-3");

#ifdef Q_WS_MAC
    // don't show icons in menu
    setAttribute(Qt::AA_DontShowIconsInMenus, true);
#endif

    // std::string codec
#if QT_VERSION < 0x050000
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
#endif
    QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

    // force number format
    QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));

    // init singleton
    Agros2D::createSingleton();
}
开发者ID:LukasKoudela,项目名称:agros2d,代码行数:26,代码来源:global.cpp


示例9: QApplication

Application::Application(int& argc, char** argv)
	: QApplication(argc, argv),
	m_window(0)
{
	setApplicationName("FocusWriter");
	setApplicationVersion("1.3.3");
	setOrganizationDomain("gottcode.org");
	setOrganizationName("GottCode");
	{
		QIcon fallback(":/hicolor/256x256/apps/focuswriter.png");
		fallback.addFile(":/hicolor/128x128/apps/focuswriter.png");
		fallback.addFile(":/hicolor/64x64/apps/focuswriter.png");
		fallback.addFile(":/hicolor/48x48/apps/focuswriter.png");
		fallback.addFile(":/hicolor/32x32/apps/focuswriter.png");
		fallback.addFile(":/hicolor/24x24/apps/focuswriter.png");
		fallback.addFile(":/hicolor/22x22/apps/focuswriter.png");
		fallback.addFile(":/hicolor/16x16/apps/focuswriter.png");
		setWindowIcon(QIcon::fromTheme("focuswriter", fallback));
	}
#ifndef Q_WS_MAC
	setAttribute(Qt::AA_DontUseNativeMenuBar);
	setAttribute(Qt::AA_DontShowIconsInMenus, !QSettings().value("Window/MenuIcons", false).toBool());
#else
	setAttribute(Qt::AA_DontShowIconsInMenus, true);
	new RTF::Converter;
#endif

	qputenv("UNICODEMAP_JP", "cp932");

	m_files = arguments().mid(1);
	processEvents();
}
开发者ID:svenna,项目名称:focuswriter,代码行数:32,代码来源:main.cpp


示例10: QtSingleApplication

Application::Application(int& argc, char** argv) :
	QtSingleApplication("org.gottcode.FocusWriter", argc, argv),
	m_window(0)
{
	setApplicationName("FocusWriter");
	setApplicationVersion(VERSIONSTR);
	setApplicationDisplayName(Window::tr("FocusWriter"));
	setOrganizationDomain("gottcode.org");
	setOrganizationName("GottCode");
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
	setWindowIcon(QIcon::fromTheme("focuswriter", QIcon(":/focuswriter.png")));
#endif

	setAttribute(Qt::AA_UseHighDpiPixmaps, true);

#ifndef Q_OS_MAC
	setAttribute(Qt::AA_DontUseNativeMenuBar);
#else
	setAttribute(Qt::AA_DontShowIconsInMenus, true);
#endif

#ifdef RTFCLIPBOARD
	new RTF::Clipboard;
#endif

	qputenv("UNICODEMAP_JP", "cp932");

	m_files = arguments().mid(1);
	processEvents();
}
开发者ID:barak,项目名称:focuswriter,代码行数:30,代码来源:application.cpp


示例11: setOrganizationName

bool
Mp3tunesHarmonyDaemon::allAboardTheDBus()
{

    setOrganizationName( "Amarok" );
    setOrganizationDomain( "amarok.kde.org" );
    setApplicationName( "Mp3tunes Harmony Daemon" );

    QDBusConnectionInterface *bus = 0;
    bus = QDBusConnection::sessionBus().interface();
    if( !bus ) {
        qFatal("No dbus!!");
        ::exit(126);
        return false;
    }
    QStringList parts = this->organizationDomain().split(QLatin1Char('.'), QString::SkipEmptyParts);
    QString reversedDomain;
    if (parts.isEmpty())
        reversedDomain = QLatin1String("local.");
    else
        foreach (const QString& s, parts)
        {
            reversedDomain.prepend(QLatin1Char('.'));
            reversedDomain.prepend(s);
        }
开发者ID:ErrAza,项目名称:amarok,代码行数:25,代码来源:Mp3tunesHarmonyDaemon.cpp


示例12: QCoreApplication

tcPlayApp::tcPlayApp ( int & argc, char ** argv)
: QCoreApplication (argc, argv)
{
    setApplicationName("Play App");
    setOrganizationName("Acme");
    setObjectName ("tcPlayApp");
}
开发者ID:hello-xk,项目名称:kiwi,代码行数:7,代码来源:main.cpp


示例13: QApplication

Application::Application(int& argc, char* argv[]) : QApplication(argc, argv)
{
    setApplicationName("Communi");
    setOrganizationName("Communi");
    setApplicationVersion(Irc::version());

    QIcon icon;
    icon.addFile(":/resources/icons/16x16/communi.png");
    icon.addFile(":/resources/icons/24x24/communi.png");
    icon.addFile(":/resources/icons/32x32/communi.png");
    icon.addFile(":/resources/icons/48x48/communi.png");
    icon.addFile(":/resources/icons/64x64/communi.png");
    icon.addFile(":/resources/icons/128x128/communi.png");
    setWindowIcon(icon);

    qRegisterMetaTypeStreamOperators<Settings>("Settings");
    qRegisterMetaTypeStreamOperators<ConnectionInfo>("ConnectionInfo");
    qRegisterMetaTypeStreamOperators<ConnectionInfos>("ConnectionInfos");

    QSettings settings;
    if (arguments().contains("-reset"))
        settings.clear();
    ApplicationData::settings = settings.value("settings").value<Settings>();

    QFile file(":resources/stylesheet.css");
    if (file.open(QFile::ReadOnly | QIODevice::Text))
        setStyleSheet(QString::fromUtf8(file.readAll()));
}
开发者ID:EldFitheach,项目名称:Mudlet,代码行数:28,代码来源:application.cpp


示例14: setApplicationName

    :KUniqueApplication()
#endif	
{    
    setApplicationName("karakaxa");
    setApplicationVersion(VERSION);
    setOrganizationName("karakaxa");
}
开发者ID:tavu,项目名称:karakaxa,代码行数:7,代码来源:application.cpp


示例15: QApplication

IDEApplication::IDEApplication(int& argc, char **argv)
    : QApplication(argc, argv),
      mSettings(NULL)
{
    setOrganizationName(PROJECT_ORGANIZATION);
    setApplicationName(PROJECT_NAME);
    setApplicationVersion(PROJECT_VERSION);
    setWindowIcon(QIcon(":/images/arduide.png"));

    // translation support
    initializeTranslator();

    // fix the data path
    mDataPath = QDir(DATA_PATH).absolutePath();

    registerMetaTypes();

    // initialize Grantlee
    initializeTemplates();

    // start the GUI
    initializeGui();

    // check the settings are correct, or start the wizard
    initializeSettings();

    // further gui initialization
    mMainWindow->initialize();

    // initialize the plugins
    initializePlugins();
}
开发者ID:coolshou,项目名称:arduide,代码行数:32,代码来源:IDEApplication.cpp


示例16: QApplication

BibleTimeApp::BibleTimeApp(int &argc, char **argv)
    : QApplication(argc, argv)
    , m_init(false)
{
    setApplicationName("bibletime");
    setApplicationVersion(BT_VERSION);
}
开发者ID:Gandh1PL,项目名称:bibletime,代码行数:7,代码来源:bibletimeapp.cpp


示例17: QApplication

PhoebetriaApp::PhoebetriaApp(int &argc, char **argv)
    : QApplication(argc, argv),
      m_currentStyle_filename()
{
    setOrganizationName("Phoebetria");
    setApplicationName("Phoebetria");

    QSettings::setDefaultFormat(QSettings::IniFormat);

    DatabaseManager db;
    db.initAllDatabases();

    if (!setTheme(m_prefs.stylesheet()))
    {
        QMessageBox::critical(
                    NULL,
                    tr("Could not set style."),
                    tr("Could not set the application style."
                               " It may not exist. Please check preferences.\n\n"
                               "Style filename: %1\n\n"
                               "Setting to the standard profile instead."
                       ).arg(m_prefs.stylesheet())
                    );
        setTheme(Themes::getBuiltInStyleSheetName());
    }

    m_globalTimer.start(200);
    m_dispatcher.start(200);

    m_fanControllerIO.connect();            // Connect to the IO device
    m_fanControllerIO.connectSignals();

    m_fanControllerIO.fanControllerData().connectSignals();
}
开发者ID:Shub77,项目名称:phoebetria-code,代码行数:34,代码来源:phoebetriaapp.cpp


示例18: QtSingleApplication

UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSingleApplication(id, argc, argv)
  , mPreferencesController(NULL)
  , mApplicationTranslator(NULL)
  , mQtGuiTranslator(NULL)
{

    staticMemoryCleaner = new QObject(0); // deleted in UBApplication destructor

    setOrganizationName("Sankore");
    setOrganizationDomain("sankore.org");
    setApplicationName("Open-Sankore");

    setApplicationVersion(UBVERSION);

#if defined(Q_WS_MAC) && !defined(QT_NO_DEBUG)
    CFStringRef shortVersion = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("CFBundleShortVersionString"));
    const char *version = CFStringGetCStringPtr(shortVersion, kCFStringEncodingMacRoman);
    Q_ASSERT(version);
    setApplicationVersion(version);
#endif

    QStringList args = arguments();

    mIsVerbose = args.contains("-v")
        || args.contains("-verbose")
        || args.contains("verbose")
        || args.contains("-log")
        || args.contains("log");


    setupTranslators(args);

    UBResources::resources();

    if (!undoStack)
        undoStack = new QUndoStack(staticMemoryCleaner);

    UBPlatformUtils::init();

    UBSettings *settings = UBSettings::settings();

    connect(settings->appToolBarPositionedAtTop, SIGNAL(changed(QVariant)), this, SLOT(toolBarPositionChanged(QVariant)));
    connect(settings->appToolBarDisplayText, SIGNAL(changed(QVariant)), this, SLOT(toolBarDisplayTextChanged(QVariant)));
    updateProtoActionsState();

#ifndef Q_WS_MAC
    setWindowIcon(QIcon(":/images/uniboard.png"));
#endif

    setStyle(new UBStyle()); // Style is owned and deleted by the application

    QString css = UBFileSystemUtils::readTextFile(UBPlatformUtils::applicationResourcesDirectory() + "/etc/Uniboard.css");
    if (css.length() > 0)
        setStyleSheet(css);

    QApplication::setStartDragDistance(8); // default is 4, and is a bit small for tablets

    installEventFilter(this);

}
开发者ID:myLiveNotes,项目名称:Sankore-3.1,代码行数:60,代码来源:UBApplication.cpp


示例19: QApplication

CalamaresApplication::CalamaresApplication( int& argc, char *argv[] )
    : QApplication( argc, argv )
    , m_mainwindow( 0 )
{
    setOrganizationName( QLatin1String( CALAMARES_ORGANIZATION_NAME ) );
    setOrganizationDomain( QLatin1String( CALAMARES_ORGANIZATION_DOMAIN ) );
    setApplicationName( QLatin1String( CALAMARES_APPLICATION_NAME ) );
    setApplicationVersion( QLatin1String( CALAMARES_VERSION ) );

    QString startupLocale = QLocale::system().uiLanguages().first();
    CalamaresUtils::installTranslator( startupLocale, this );

    QFont f = font();

    cDebug() << "Default font ====="
             << "\nPixel size:   " << f.pixelSize()
             << "\nPoint size:   " << f.pointSize()
             << "\nPoint sizeF:  " << f.pointSizeF()
             << "\nFont family:  " << f.family()
             << "\nMetric height:" << QFontMetrics( f ).height();
    // The following line blocks for 15s on Qt 5.1.0
    cDebug() << "Font height:" << QFontMetrics( f ).height();
    CalamaresUtils::setDefaultFontSize( f.pointSize() );

    cDebug() << "Available languages:" << QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';' );
}
开发者ID:toudi,项目名称:calamares,代码行数:26,代码来源:CalamaresApplication.cpp


示例20: QApplication

TApplication::TApplication(int & argc, char** argv)
    : QApplication(argc, argv)
{
    setOrganizationName("Enterprise");
    setApplicationName("QBalance");
    setApplicationVersion("0.0.1");
    setWindowIcon(QIcon(":qbalance.ico"));

    db  = new DBFactory();
    gui = new GUIFactory(db);

    dictionaryList = 0;
    topersList = 0;
    driverFR = 0;
    barCodeReader = new BarCodeReader(this, config.barCodeReaderPort);

    driverFRisValid = false;
    driverFRlocked = false;
    fsWebCamIsValid = true;                     // Поначалу будем считать, что утилита fsWebCam установлена

    reportTemplateType = OOXMLreportTemplate;

    cardReaderCode = "";                        // Прочитанный код на магнитной карте

    if (!Exemplar)
    {
        Exemplar = this;
    }
    initConfig();

    connect(&timer, SIGNAL(timeout()), this, SLOT(setTimeIsOut()));
    timeIsOut = false;

}
开发者ID:rovan,项目名称:qbalance,代码行数:34,代码来源:app.cpp



注:本文中的setApplicationName函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setArea函数代码示例发布时间:2022-05-30
下一篇:
C++ setAnimation函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap