当前位置: 首页>>代码示例>>C++>>正文


C++ About::setVersion方法代码示例

本文整理汇总了C++中About::setVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ About::setVersion方法的具体用法?C++ About::setVersion怎么用?C++ About::setVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在About的用法示例。


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

示例1: isAboutMenu

bool isAboutMenu(int argc, char *argv[]) {
    if (argc != 2)
        return false;

    QString arg(argv[1]);
    arg = arg.trimmed().toUpper();
    if (arg == "-ABOUT" || arg == "--ABOUT") {
        Q_INIT_RESOURCE(AboutResources);
        About about;
        about.setAppName(APP_NAME);
        about.setVersion(APP_VERSION);
        about.setDescription(APP_DESCRIPTION);
        about.setContactInfo(CONTACT_INFO);
        about.exec();
        return true;
    }

    return false;
}
开发者ID:Terrabits,项目名称:S2pExtractor,代码行数:19,代码来源:main.cpp

示例2: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    logfileIndicator (new QLabel ( this)),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    this->setWindowTitle( tr("QT Logger") );

    version = "1.1.2";


    this->setMouseTracking(true);
    this->setBackgroundRole(QPalette::Base);

    QCoreApplication::setOrganizationName("openhpsdr");
    QCoreApplication::setOrganizationDomain("openhpsdr.org");
    QCoreApplication::setApplicationName("QtLogger");

    //logfileIndicator->setStyleSheet (QString ("QLabel {color:red}"));
    logfileIndicator->setPixmap(QPixmap(":/icons/filefoldergrey16.svg"));
    logfileIndicator->setToolTip(QString("Logfile: No file")  );

    About *about = new About();
    about->setVersion( version );


    Help *help = new Help();

    data = new Data();
    data->setMinimumHeader();

    add = new addDialog( this );


    readDefinitions(":/xml/adif_codes_2.2.7.xml");


    add->loadmodeComboBox( modes );
    add->loadcountryComboBox( country );
    add->loadsubdivisionsComboBox( subdivisions );
    add->loadbandsData( bands );

    last = new lastContact( this );

    pref = new Preferences( this );
    pref->setPreferences( QString("radio"), settings.value("preference_radio").toString() );
    pref->setPreferences( QString("location"), settings.value("preference_location").toString() );
    pref->setPreferences( QString("event"), settings.value("preference_event").toString() );
    pref->setPreferences( QString("owner"), settings.value("preference_owner").toString() );
    pref->setPreferences( QString("qsl"), settings.value("preference_qsl").toString() );
    pref->setPreferences( QString("callfilter"), settings.value("callsign_filter").toString() );
    add->callsign_filter = pref->getPreferences("callfilter");


    udpSocket = new QUdpSocket(this);
    udpSocket->bind( 11500, QUdpSocket::ShareAddress );

    statusBar ()->addPermanentWidget (logfileIndicator);

    ui->tableView->verticalScrollBar()->setValue(ui->tableView->verticalScrollBar()->maximum());

    deleteFlag = false;

    connect(udpSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()));
    connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(closeDown()));
    connect(ui->actionAbout,SIGNAL(triggered()),about,SLOT(aboutMessage()));
    connect(ui->actionHelp,SIGNAL(triggered()),help,SLOT(show()));
    connect(ui->actionPreferences,SIGNAL(triggered()),pref,SLOT(show()));
    connect(pref,SIGNAL(preferencesChanged()),this,SLOT(updateView()));
    connect(ui->actionOpen,SIGNAL(triggered()),data,SLOT(readData()));
    connect(ui->actionLast_Contact,SIGNAL(triggered()),last,SLOT(show()));
    connect(ui->actionOpen,SIGNAL(triggered()),this,SLOT(updateStatus()));
    connect(ui->actionSave,SIGNAL(triggered()),this,SLOT(writeData()));
    connect(ui->actionSupport_Directory,SIGNAL(triggered()),this,SLOT(setSupportDirectory()));
    connect(ui->actionLog_Directory,SIGNAL(triggered()),this,SLOT(setLogDirectory()));
    connect(ui->tableView,SIGNAL(clicked(QModelIndex)),this,SLOT(removeTableRow(QModelIndex)));
    connect(ui->tableView,SIGNAL(activated(QModelIndex)),ui->tableView,SLOT(resizeRowsToContents()));
    connect(ui->actionAdd,SIGNAL(triggered()),add,SLOT(show()));
    connect(add,SIGNAL(newdata()),this,SLOT(update()));
    connect(data,SIGNAL(refresh()),this,SLOT(update()));
    connect(ui->actionDelete,SIGNAL(toggled(bool)),this,SLOT(setDeleteFlag(bool)));
    connect(add,SIGNAL(ownerChanged()),this,SLOT(updateOwner()));
    connect(add,SIGNAL(prefixChanged(QString)),last->proxyModel,SLOT(setFilterRegExp(QString)));
    connect(add,SIGNAL(prefixChanged(QString)),last,SLOT(setCallLabel(QString)));
    connect(add,SIGNAL(prefixChanged(QString)),add->proxyModel,SLOT(setFilterRegExp(QString)));
}
开发者ID:compeoree,项目名称:QtSDR,代码行数:87,代码来源:mainwindow.cpp


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