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

C++ currentIndexChanged函数代码示例

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

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



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

示例1: checkPlaylist

void MediaPlayer :: checkPlaylist(int currentIndex)
{
    // this fires on startup with index -1 for some reason
    if(currentIndex != -1)
    {
        setArtist(plModel->data(plModel->index(currentIndex), plModel->Artist).toString());
        setTitle(plModel->data(plModel->index(currentIndex), plModel->Title).toString());

        qDebug() << "currIndex: " << currentIndex;

        emit currentIndexChanged();

        if(autoQueue)
        {
            //check if current item is the last in list
            if(currentIndex == (playlist->mediaCount() -1))
            {
                //insert random item next
                tracker->randomItem();
            }
        }
    }
}
开发者ID:r0kk3rz,项目名称:SirenSong-Media-Player,代码行数:23,代码来源:mediaplayer.cpp


示例2: FormGenChoiceCompositionContainer

FormGenChoiceCompositionComboListContainer::FormGenChoiceCompositionComboListContainer(bool listMode, QWidget *parent)
    : FormGenChoiceCompositionContainer(parent)
    , mComboBox(nullptr)
    , mListView(nullptr)
    , mListModel(nullptr)
    , mElementContainer(new QWidget)
    , mElementLayout(new QStackedLayout)
{
    mElementContainer->setLayout(mElementLayout);

    auto outerLayout = new QGridLayout;
    outerLayout->setContentsMargins(0, 0, 0, 0);

    if( listMode ) {
        mListView = new QListView;
        mListModel = new QStringListModel;
        mListView->setModel(mListModel);
        connect(mListView->selectionModel(), &QItemSelectionModel::currentChanged,
                [this] ()
        {
            const int row = mListView->selectionModel()->currentIndex().row();
            mElementLayout->setCurrentIndex(row);
            emit currentIndexChanged(row);
        });
        outerLayout->addWidget(mListView, 0, 0, 1, 2);
    } else {
        mComboBox = new QComboBox;
        connect(mComboBox, SIGNAL(currentIndexChanged(int)), mElementLayout, SLOT(setCurrentIndex(int)));
        connect(mComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(currentIndexChanged(int)));
        outerLayout->addWidget(mComboBox, 0, 0, 1, 2);
    }

    outerLayout->addItem(new QSpacerItem(s_frameSubContentMargin, 1), 1, 0);
    outerLayout->addWidget(mElementContainer, 1, 1);

    setLayout(outerLayout);
}
开发者ID:z-s-e,项目名称:FormGenWidgets-Qt,代码行数:37,代码来源:formgencompositionwidgets.cpp


示例3: switch

bool HelpDialog::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: showTopic((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 1: showTopic((int)static_QUType_int.get(_o+1),(QListViewItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 2: showTopic((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: loadIndexFile(); break;
    case 4: insertContents(); break;
    case 5: setupFullTextIndex(); break;
    case 6: currentTabChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    case 7: currentIndexChanged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 8: showTopic(); break;
    case 9: searchInIndex((const QString&)static_QUType_QString.get(_o+1)); break;
    case 10: addBookmark(); break;
    case 11: removeBookmark(); break;
    case 12: currentBookmarkChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 13: currentContentsChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 14: startSearch(); break;
    case 15: showSearchHelp(); break;
    case 16: initialize(); break;
    case 17: toggleContents(); break;
    case 18: toggleIndex(); break;
    case 19: toggleBookmarks(); break;
    case 20: toggleSearch(); break;
    case 21: lastWinClosed(); break;
    case 22: showResultPage((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 23: showResultPage((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 24: setIndexingProgress((int)static_QUType_int.get(_o+1)); break;
    case 25: showItemMenu((QListBoxItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 26: showItemMenu((QListViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 27: insertBookmarks(); break;
    case 28: processEvents(); break;
    default:
	return HelpDialogBase::qt_invoke( _id, _o );
    }
    return TRUE;
}
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:37,代码来源:moc_helpdialogimpl.cpp


示例4: QDialog

NewGameDialog::NewGameDialog(QWidget* parent)
	: QDialog(parent),
	  ui(new Ui::NewGameDialog)
{
	ui->setupUi(this);

	m_engines = new EngineConfigurationModel(
		CuteChessApplication::instance()->engineManager(), this);

	connect(ui->m_configureWhiteEngineButton, SIGNAL(clicked(bool)), this,
		SLOT(configureWhiteEngine()));
	connect(ui->m_configureBlackEngineButton, SIGNAL(clicked(bool)), this,
		SLOT(configureBlackEngine()));

	connect(ui->m_timeControlBtn, SIGNAL(clicked()),
		this, SLOT(showTimeControlDialog()));

	m_proxyModel = new EngineConfigurationProxyModel(this);
	m_proxyModel->setSourceModel(m_engines);
	m_proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
	m_proxyModel->sort(0);
	m_proxyModel->setDynamicSortFilter(true);

	ui->m_whiteEngineComboBox->setModel(m_proxyModel);
	ui->m_blackEngineComboBox->setModel(m_proxyModel);

	ui->m_variantComboBox->addItems(Chess::BoardFactory::variants());
	connect(ui->m_variantComboBox, SIGNAL(currentIndexChanged(QString)),
		this, SLOT(onVariantChanged(QString)));

	int index = ui->m_variantComboBox->findText("standard");
	ui->m_variantComboBox->setCurrentIndex(index);

	m_timeControl.setMovesPerTc(40);
	m_timeControl.setTimePerTc(300000);
	ui->m_timeControlBtn->setText(m_timeControl.toVerboseString());
}
开发者ID:coyotte508,项目名称:cutechess,代码行数:37,代码来源:newgamedlg.cpp


示例5: QLabel

void PropertiesManager::createEventPortProperties(EventPortTextItem *ep)
{
    //move up down
    root->actionMove_Up->setEnabled(true);
    root->actionMove_Down->setEnabled(true);
    root->actionDeleteItems->setEnabled(true);

    QLabel *label = new QLabel("<b>Edit Event Port</b>");
    addRow(label);

    QComboBox *mode = new QComboBox();
    mode->addItem("Send");
    mode->addItem("Receive");
    EventPortMode m = ep->getPortMode();
    switch(m){
    case(EventSendPort):{
        mode->setCurrentIndex(0);
        break;
    }
    case(EventRecvPort):{
        mode->setCurrentIndex(1);
        break;
    }
    default:{
        mode->setCurrentIndex(-1);
    }
    }
    connect(mode, SIGNAL(currentIndexChanged(QString)), ep, SLOT(setPortMode(QString)));
    addRow(tr("Event &Mode:"), mode);

    QLineEdit *name = new QLineEdit();
    name->installEventFilter(&eventFilterObject);
    name->setText(ep->getName());
    name->setValidator(validator);
    connect(name, SIGNAL(textEdited(QString)), ep, SLOT(setName(QString)));
    addRow(tr("&Name:"),name);
}
开发者ID:ABRG-Models,项目名称:SpineCreator,代码行数:37,代码来源:propertiesmanager.cpp


示例6: QWidget

processByDignityWidget::processByDignityWidget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::processByDignityWidget),
    fechaModel(new QSqlTableModel),
    resultModel(new QSqlTableModel),
    noaaResultModel(new QSqlTableModel),
    information(new dataProcessor)
{
    ui->setupUi(this);
    QStringList items;

    connect(ui->filterButton, SIGNAL(clicked()), this, SLOT(doCalc()));
    connect(ui->dignityFilterButton, SIGNAL(clicked()), this, SLOT(calcDignity()));

    connect(ui->addButton, SIGNAL(clicked()), this, SLOT(add()));
    connect(ui->delButton, SIGNAL(clicked()), this, SLOT(del()));

    items << "Normal" << "Luna llena" << "Luna nueva" << "Equinoccios" << "Solsticios";
    ui->tipoComboBox->addItems(items);
    fechaModel->setTable("view_estadotiempos");
    fechaModel->select();
    //resultModel->setTable("validweather");
    resultModel->setTable("view_estadotiempos");
    noaaResultModel->setTable("estadotiempos_diarios");
    ui->tableView->setModel(resultModel);
    ui->noaaTableView->setModel(noaaResultModel);
    ui->fechaComboBox->setModel(fechaModel);
    ui->fechaComboBox->setModelColumn(0);
    dateTypeChanged("Normal");
    setWindowTitle("Procesar por Dignidades");
    connect(ui->tipoComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(dateTypeChanged(QString)));

    ui->noaaTableView->setContextMenuPolicy(Qt::CustomContextMenu);
    ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu);
    connect(ui->noaaTableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(noaaMenu(QPoint)));
    connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(dailyMenu(QPoint)));
}
开发者ID:jacapoduri,项目名称:MeteoAstrologia,代码行数:37,代码来源:processbydignitywidget.cpp


示例7: MusicAbstractMoveDialog

MusicUserDialog::MusicUserDialog(QWidget *parent)
    : MusicAbstractMoveDialog(parent),
      ui(new Ui::MusicUserDialog)
{
    ui->setupUi(this);

    m_userModel = new MusicUserModel(this);

    MusicTime::timeSRand();
    changeVerificationCode();

    ui->topTitleCloseButton->setIcon(QIcon(":/share/searchclosed"));
    ui->topTitleCloseButton->setStyleSheet(MusicUIObject::MToolButtonStyle03);
    ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
    ui->topTitleCloseButton->setToolTip(tr("Close"));
    connect(ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));

    firstStatckWidget();
    secondStatckWidget();
    thirdStatckWidget();

    ui->userComboBox->addItems(m_userModel->getAllUsers());
    connect(ui->userComboBox, SIGNAL(currentIndexChanged(QString)),
                              SLOT(userComboBoxChanged(QString)));
    connect(ui->userComboBox, SIGNAL(editTextChanged(QString)),
                              SLOT(userEditTextChanged(QString)));
    m_userName = ui->userComboBox->currentText();
    readFromUserConfig();

    QButtonGroup *buttonGroup = new QButtonGroup(this);
    buttonGroup->addButton(ui->useTencentLogin, 0);
    buttonGroup->addButton(ui->useRenrenLogin, 1);
    buttonGroup->addButton(ui->useWechatLogin, 2);
    buttonGroup->addButton(ui->useSinaLogin, 3);
    connect(buttonGroup, SIGNAL(buttonClicked(int)), SLOT(buttonClicked(int)));
}
开发者ID:AndyQsmart,项目名称:TTKMusicplayer,代码行数:36,代码来源:musicuserdialog.cpp


示例8: currentPaperChanged

void PaperManager::paperClosed( const QVariant & var )
{
    QQuickItem *paper = var.value<QQuickItem*>();
    if( p->buffer.indexOf(paper) == 0 && p->current != 0 )
    {
        paper->setProperty( "x" ,paper->property("closeX") );
        return;
    }

    if( p->current >= p->papers.count() )
        QMetaObject::invokeMethod( paper, "save" );

    p->current++;
    emit currentPaperChanged();
    emit currentIndexChanged();

    if( p->current == 1 )
    {
        p->buffer.last()->setProperty( "visible" ,true );
        load_buffers();
        return;
    }

    QQuickItem *top = p->buffer.takeFirst();
    p->buffer << top;
    reindexBuffer();

    top->setProperty( "anim" ,false );
    top->setProperty( "x" ,0 );

    top->setProperty( "opacity", 0 );
    QMetaObject::invokeMethod( top, "startAnimation" );
    top->setProperty( "opacity", 1 );

    load_buffers();
}
开发者ID:Aseman-Land,项目名称:Papyrus,代码行数:36,代码来源:papermanager.cpp


示例9: Q_UNUSED

QWidget* Strings::createEditor(QWidget * parent, const QModelIndex & index)
{
    Q_UNUSED(index);
    QStringList variants = propertyVariants();
    if (!variants.isEmpty()) {
        QComboBox * cb = new QComboBox(parent);
        cb->addItems(variants);
        connect(cb, SIGNAL(currentIndexChanged(QString)), this, SLOT(setValue(QString)));
        return cb;
    } else {
        QLineEdit *le = new QLineEdit(parent);
        if (validator(QVariant::String))
        {
            validator(QVariant::String)->setObject(object());
            validator(QVariant::String)->setProperty(objectPropertyName());
            le->setValidator(validator(QVariant::String));
        }
        le->setText(value().toString());
        connect(le, SIGNAL(textChanged(const QString&)), this, SLOT(setValue(const QString&)));
        le->setFrame(false);
        return le;
    }

}
开发者ID:Jinxiaohai,项目名称:QT,代码行数:24,代码来源:strings.cpp


示例10: QDialog

DataPlotUI::DataPlotUI(int deploymentId, QWidget *parent)
    : QDialog(parent) {
    ui.setupUi(this);

    this->deploymentId = deploymentId;

    // init combo boxes
    initComboArea();

    // connect signals and slots
    connect(ui.cbMeasurementProfileID, SIGNAL(currentIndexChanged(QString)), this, SLOT(measurementProfileChanged()));
    connect(ui.btnClose, SIGNAL(clicked()), this, SLOT(closeButtonClicked()));

    //ui.plData->setTitle("Data");
    ui.plData->setAxisTitle(QwtPlot::xBottom, "Time");
    ui.plData->setAxisTitle(QwtPlot::yLeft, "Temperature [Celsius]");
    ui.plData->setCanvasBackground(Qt::white);

    curve1 = new QwtPlotCurve("Measurements");
    curve1->attach(ui.plData);
    curve1->setPen(QPen(Qt::black, 1, Qt::SolidLine));

    ui.plData->replot();
}
开发者ID:lachlan007,项目名称:iassist,代码行数:24,代码来源:DataPlotUI.cpp


示例11: QMainWindow

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

    ontology_viewer.show();
    label_viewer.show();
    tracker_output_viewer.show();

    // Action menu for opening the files
    connect(this->ui->actionOpen_ontology, SIGNAL(triggered()), this, SLOT(openOntology()));
    connect(this->ui->actionOpen_dialogs, SIGNAL(triggered()), this, SLOT(openDialogs()));
    connect(this->ui->actionOpen_tracker_output, SIGNAL(triggered()), this, SLOT(openTrackerOutput()));

    // Leave on quit
    connect(this->ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()));

    // Show an help message when requested
    connect(this->ui->actionManual, SIGNAL(triggered()), this, SLOT(showTips()));

    // Detecting that a new dialog is selected
    connect(this->ui->dialog_combBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeDialog(QString)));

    // Browsing the dialogs
    connect(this->ui->dialog_prevButton, SIGNAL(clicked()), this, SLOT(prev_dialog()));
    connect(this->ui->dialog_nextButton, SIGNAL(clicked()), this, SLOT(next_dialog()));

    // Using the possibility to filter the dialogs by a prefix
    connect(this->ui->dialog_prefix_lineedit, SIGNAL(textChanged(QString)), this, SLOT(dialog_prefix_textChanged(QString)));

    // Getting the info the tracker output wants to be sync to the mainwindow session id
    connect(&tracker_output_viewer, SIGNAL(sig_sync_to_dialog(bool)), this, SLOT(sync_tracker_output_to_session(bool)));


}
开发者ID:jeremyfix,项目名称:dstc,代码行数:36,代码来源:mainwindow.cpp


示例12: setupUi

void AddNetworkSinkDialog::initializeGUI()
{
    setupUi(this);
    connect(mCbNAPIImpl, SIGNAL(currentIndexChanged(QString)), this, SLOT(NAPISelectionChanged(QString)));

    if (!CONF.DebuggingEnabled())
    {
        mGbRequirements->hide();
        mGbInterface->hide();
        // minimize layout
        ShrinkWidgetToMinimumSize();
    }
    if ((mDataType != DATA_TYPE_VIDEO) && (mDataType != DATA_TYPE_AUDIO))
    {
        mCbRtp->hide();
    }

    // is the source something different than a muxer?
    if (!mMediaSource->SupportsMuxing())
    {// the input stream from the source has to relayed, without RTP an additional encapsulation
        mCbRtp->setChecked(false);
        mCbRtp->setEnabled(false);
    }
}
开发者ID:Lethea,项目名称:Homer-Conferencing,代码行数:24,代码来源:AddNetworkSinkDialog.cpp


示例13: QWidget

startDialog::startDialog(QApplication *a, int argc, char *argv[], QWidget *parent) : QWidget(parent) {
    ui = new Ui::Form;
    ui->setupUi(this);
    app = a;
    scanSkins();
    loadSettings();
    bool st = false;
    for (int i = 0; i < argc; i++) {
        QString cur = argv[i];
        if ((cur == "-i") || (cur == "--ip"))
            ui->lineEdit_2->setText(argv[i + 1]);
        else if ((cur == "-p") || (cur == "--port"))
            ui->spinBox->setValue(QString(argv[i + 1]).toInt());
        else if ((cur == "-n") || (cur == "--name"))
            ui->lineEdit->setText(QString(argv[i + 1]));
        else if ((cur == "-s") || (cur == "--start"))
            st = true;
        else if ((cur == "-h") || (cur == "--help")) {
            printf("Welcome to labyrus-client documentation\n");
            printf("-i --ip int.int.int.int        to set ip address\n");
            printf("-p --port int                  to set port number\n");
            printf("-n --name name                 to set name of player\n");
            printf("-s --start                     to auto start game\n");
            printf("-h --help                      to show this help\n");
            exit(0);
        }
    }

    if (st) {
        QTimer::singleShot(100, this, SLOT(start()));
    } else {
        QObject::connect(ui->commandLinkButton, SIGNAL(clicked()), this, SLOT(start()));
        QObject::connect(ui->comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(setPix(QString)));
    }
    ui->commandLinkButton->setFocus();
}
开发者ID:anonymouse1,项目名称:Labyrus,代码行数:36,代码来源:startdialog.cpp


示例14: Q_ASSERT

void KNCategoryTabBar::setCurrentIndex(int buttonIndex)
{
    Q_ASSERT(buttonIndex>-1 && buttonIndex<m_buttonList.size());
    //If the current index is button clicked, do nothing.
    if(m_locked || buttonIndex==m_currentIndex)
    {
        return;
    }
    KNCategoryButton *button;
    //Reset the old current index button, check the index first.
    if(m_currentIndex!=-1 && m_currentIndex<m_buttonList.size())
    {
        button=m_buttonList.at(m_currentIndex);
        button->setChecked(false);
    }
    //Set to the current index.
    m_currentIndex=buttonIndex;
    button=m_buttonList.at(m_currentIndex);
    button->setChecked(true);
    //Lock the tabbed
    m_locked=true;
    //Emit index changed signal.
    emit currentIndexChanged(m_currentIndex);
}
开发者ID:EAGzzyCSL,项目名称:Mu,代码行数:24,代码来源:kncategorytabbar.cpp


示例15: QDialog

// AppearanceSettings ----------------------------------------------------
AppearanceSettings::AppearanceSettings( QWidget* parent, Qt::WFlags fl )
    : QDialog(parent, fl),
    mIsStatusView(false), mIsFromActiveProfile(false)
{
    setupUi();
    readThemeSettings();
    readColorSchemeSettings();

    // Populate the first combo box (theme).
    populate();

    // Select the theme to populate the other combo boxes.
    // Note that they are not connected yet, so no preview is requested.
    themeSelected(mActiveThemeIndex);

    // Connect the combo boxes.
    connect( mThemeCombo, SIGNAL(currentIndexChanged(int)),
            this, SLOT(themeSelected(int)) );
    connect( mColorCombo, SIGNAL(currentIndexChanged(int)),
            this, SLOT(colorSelected(int)) );
    connect( mBgCombo, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(backgroundSelected(QString)) );
    connect( mLabelCkBox, SIGNAL(toggled(bool)),
            this, SLOT(labelToggled(bool)) );

    connect( qApp, SIGNAL(appMessage(QString,QByteArray)),
        this, SLOT(receive(QString,QByteArray)) );

    // Re-select the theme to request the previews.
    themeSelected(mActiveThemeIndex);

    QSoftMenuBar::menuFor( this )->addAction
        ( QIcon( ":icon/Note" ), tr( "Add to current profile" ), this, SLOT(pushSettingStatus()) );
    QSoftMenuBar::menuFor( this )->addAction
        ( QIcon( ":image/homescreen/homescreen" ), tr( "Homescreen Settings..." ), this, SLOT(openHomescreenSettings()) );
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:37,代码来源:appearance.cpp


示例16: PageWidget

//==========
//    PUBLIC
//==========
page_mouse_trueos::page_mouse_trueos(QWidget *parent) : PageWidget(parent), ui(new Ui::page_mouse_trueos()){
  ui->setupUi(this);
  QString program = "/usr/sbin/moused";
  
  ui->slider_mouseAcceleration->setRange(1,200);
  ui->slider_mouseAcceleration->setValue(100);
  connect( ui->slider_mouseAcceleration, SIGNAL(valueChanged(int)), this, SLOT(setValue(double)));
  realAccelValue = ( ui->slider_mouseAcceleration->value() / divisor);
  realAccelValueString = QString::number(ui->slider_mouseAcceleration->value() / divisor, 'f', 2);
  
  ui->slider_doubleClickThreshold->setRange(1,1000);
  ui->slider_doubleClickThreshold->setValue(500);
  connect( ui->slider_doubleClickThreshold, SIGNAL(valueChanged(int)), this, SLOT(setValue(double)));
  realDoubleClickValue = (ui->slider_doubleClickThreshold->value());
  realDoubleClickValueString = QString::number(ui->slider_doubleClickThreshold->value());

  ui->combobox_resolutionBox->setCurrentIndex(1);
  connect(ui->combobox_resolutionBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(setMouseResolution()) );

  connect(ui->checkBoxHandedness, SIGNAL(toggled(bool)), this, SLOT(swapHandedness()) );
  connect(ui->checkBoxTerminateDrift, SIGNAL(toggled(bool)), this, SLOT(terminateDrift()) );

  connect( ui->button_apply, SIGNAL(clicked()), this, SLOT(updateMoused()));
}
开发者ID:trueos,项目名称:lumina,代码行数:27,代码来源:page_mouse_trueos.cpp


示例17: QWizard

crmaccountMerge::crmaccountMerge(QWidget* parent, const char* name, Qt::WFlags fl)
    : QWizard(parent, fl)
{
  setupUi(this);
  if (name)
    setObjectName(name);
  _data = new crmaccountMergePrivate(this);
  QPixmap *pixmap = new QPixmap(":/images/icon128x32.png");
  if (pixmap)
  {
#ifdef Q_WS_MAC
  setPixmap(BackgroundPixmap, *pixmap);
#else
  setPixmap(BannerPixmap,     *pixmap);
#endif
  }

  QWizardPage *picktaskpage = new CrmaccountMergePickTaskPage(this);
  QWizardPage *pickacctpage = new CrmaccountMergePickAccountsPage(this);
  QWizardPage *pickdatapage = new CrmaccountMergePickDataPage(this);
  QWizardPage *mergerespage = new CrmaccountMergeResultPage(this);
  QWizardPage *mergeprgpage = new CrmaccountMergePurgePage(this);

  setPage(Page_PickTask,        picktaskpage);
  setPage(Page_PickAccounts,    pickacctpage);
  setPage(Page_PickData,        pickdatapage);
  setPage(Page_Result,          mergerespage);
  setPage(Page_Purge,           mergeprgpage);

  setButtonText(CancelButton, tr("Close"));

  setDefaultProperty("XComboBox", "text", SIGNAL(currentIndexChanged(QString)));

  connect(mergeprgpage, SIGNAL(mergeSetChanged()), picktaskpage, SLOT(sUpdateComboBoxes()));
  connect(mergeprgpage, SIGNAL(mergeSetChanged()), mergerespage, SLOT(clearIfPurged()));
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:36,代码来源:crmaccountMerge.cpp


示例18: QMainWindow

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

    connect(ui->laserCommState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleLaserComms(QString)));
    connect(ui->cameraCommsState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleCameraComms(QString)));
    connect(ui->laserOpState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleLaserOpState(QString)));
    connect(ui->cameraOpState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleCameraOpState(QString)));
    connect(ui->roverOpState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleRoverOpState(QString)));
    connect(ui->laserActiveState, SIGNAL(currentIndexChanged(QString)),
            this, SLOT(handleLaserFireState(QString)));
    show();
}
开发者ID:dishbreak,项目名称:wende-project,代码行数:20,代码来源:testpanel.cpp


示例19: QDialog

Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
    : QDialog(parent)
    , ui(new Ui::Preferences)
    , p_QupZilla(mainClass)
    , m_pluginsList(0)
{
    setAttribute(Qt::WA_DeleteOnClose);
    ui->setupUi(this);

#ifdef KDE
    ui->listWidget->item(0)->setIcon(QIcon::fromTheme("preferences-desktop", QIcon(":/icons/preferences/preferences-desktop.png")));
    ui->listWidget->item(1)->setIcon(QIcon::fromTheme("format-stroke-color", QIcon(":/icons/preferences/application-x-theme.png")));
    ui->listWidget->item(2)->setIcon(QIcon::fromTheme("tab-new-background", QIcon(":/icons/preferences/applications-internet.png")));
    ui->listWidget->item(3)->setIcon(QIcon::fromTheme("preferences-system-network", QIcon(":/icons/preferences/applications-webbrowsers.png")));
    ui->listWidget->item(4)->setIcon(QIcon::fromTheme("preferences-desktop-font", QIcon(":/icons/preferences/applications-fonts.png")));
    ui->listWidget->item(5)->setIcon(QIcon::fromTheme("download", QIcon(":/icons/preferences/mail-inbox.png")));
    ui->listWidget->item(6)->setIcon(QIcon::fromTheme("user-identity", QIcon(":/icons/preferences/dialog-password.png")));
    ui->listWidget->item(7)->setIcon(QIcon::fromTheme("preferences-system-firewall", QIcon(":/icons/preferences/preferences-system-firewall.png")));
    ui->listWidget->item(8)->setIcon(QIcon::fromTheme("preferences-desktop-notification", QIcon(":/icons/preferences/dialog-question.png")));
    ui->listWidget->item(9)->setIcon(QIcon::fromTheme("preferences-plugin", QIcon(":/icons/preferences/extension.png")));
    ui->listWidget->item(10)->setIcon(QIcon::fromTheme("applications-system", QIcon(":/icons/preferences/applications-system.png")));
#else
    ui->listWidget->item(0)->setIcon(QIcon::fromTheme("preferences-desktop", QIcon(":/icons/preferences/preferences-desktop.png")));
    ui->listWidget->item(1)->setIcon(QIcon::fromTheme("application-x-theme", QIcon(":/icons/preferences/application-x-theme.png")));
    ui->listWidget->item(2)->setIcon(QIcon::fromTheme("applications-internet", QIcon(":/icons/preferences/applications-internet.png")));
    ui->listWidget->item(3)->setIcon(QIcon::fromTheme("applications-webbrowsers", QIcon(":/icons/preferences/applications-webbrowsers.png")));
    ui->listWidget->item(4)->setIcon(QIcon::fromTheme("applications-fonts", QIcon(":/icons/preferences/applications-fonts.png")));
    ui->listWidget->item(5)->setIcon(QIcon::fromTheme("mail-inbox", QIcon(":/icons/preferences/mail-inbox.png")));
    ui->listWidget->item(6)->setIcon(QIcon::fromTheme("dialog-password", QIcon(":/icons/preferences/dialog-password.png")));
    ui->listWidget->item(7)->setIcon(QIcon::fromTheme("preferences-system-firewall", QIcon(":/icons/preferences/preferences-system-firewall.png")));
    ui->listWidget->item(8)->setIcon(QIcon::fromTheme("dialog-question", QIcon(":/icons/preferences/dialog-question.png")));
    ui->listWidget->item(9)->setIcon(QIcon::fromTheme("extension", QIcon(":/icons/preferences/extension.png")));
    ui->listWidget->item(10)->setIcon(QIcon::fromTheme("applications-system", QIcon(":/icons/preferences/applications-system.png")));
#endif

    Settings settings;
    //GENERAL URLs
    settings.beginGroup("Web-URL-Settings");
    m_homepage = settings.value("homepage", "qupzilla:start").toString();
    m_newTabUrl = settings.value("newTabUrl", "qupzilla:speeddial").toString();
    ui->homepage->setText(m_homepage);
    ui->newTabUrl->setText(m_newTabUrl);
    int afterLaunch = settings.value("afterLaunch", 1).toInt();
    settings.endGroup();
    ui->afterLaunch->setCurrentIndex(afterLaunch);
    ui->checkUpdates->setChecked(settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool());
    ui->dontLoadTabsUntilSelected->setChecked(settings.value("Web-Browser-Settings/LoadTabsOnActivation", false).toBool());

    ui->newTabFrame->setVisible(false);
    if (m_newTabUrl.isEmpty()) {
        ui->newTab->setCurrentIndex(0);
    }
    else if (m_newTabUrl == m_homepage) {
        ui->newTab->setCurrentIndex(1);
    }
    else if (m_newTabUrl == "qupzilla:speeddial") {
        ui->newTab->setCurrentIndex(2);
    }
    else {
        ui->newTab->setCurrentIndex(3);
        ui->newTabFrame->setVisible(true);
    }

    afterLaunchChanged(ui->afterLaunch->currentIndex());
    connect(ui->afterLaunch, SIGNAL(currentIndexChanged(int)), this, SLOT(afterLaunchChanged(int)));
    connect(ui->newTab, SIGNAL(currentIndexChanged(int)), this, SLOT(newTabChanged(int)));
    connect(ui->useCurrentBut, SIGNAL(clicked()), this, SLOT(useActualHomepage()));
    connect(ui->newTabUseCurrent, SIGNAL(clicked()), this, SLOT(useActualNewTab()));

    //PROFILES
    m_actProfileName = mApp->getActiveProfilPath();
    m_actProfileName = m_actProfileName.left(m_actProfileName.length() - 1);
    m_actProfileName = m_actProfileName.mid(m_actProfileName.lastIndexOf("/"));
    m_actProfileName.remove("/");

    ui->activeProfile->setText("<b>" + m_actProfileName + "</b>");

    QSettings profileSettings(mApp->PROFILEDIR + "profiles/profiles.ini", QSettings::IniFormat);
    QString actProfileName = profileSettings.value("Profiles/startProfile", "default").toString();

    ui->startProfile->addItem(actProfileName);
    QDir profilesDir(mApp->PROFILEDIR + "profiles/");
    QStringList list_ = profilesDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
    foreach(const QString & name, list_) {
        if (actProfileName == name) {
            continue;
        }
        ui->startProfile->addItem(name);
    }
    connect(ui->createProfile, SIGNAL(clicked()), this, SLOT(createProfile()));
    connect(ui->deleteProfile, SIGNAL(clicked()), this, SLOT(deleteProfile()));
    connect(ui->startProfile, SIGNAL(currentIndexChanged(QString)), this, SLOT(startProfileIndexChanged(QString)));
    startProfileIndexChanged(ui->startProfile->currentText());

    //APPEREANCE
    m_themesManager = new ThemeManager(ui->themesWidget, this);
    settings.beginGroup("Browser-View-Settings");
    ui->showStatusbar->setChecked(settings.value("showStatusBar", true).toBool());
    ui->showBookmarksToolbar->setChecked(p_QupZilla->bookmarksToolbar()->isVisible());
    ui->showNavigationToolbar->setChecked(p_QupZilla->navigationBar()->isVisible());
//.........这里部分代码省略.........
开发者ID:jaitrum,项目名称:QupZilla,代码行数:101,代码来源:preferences.cpp


示例20: tr

void SettingsDialog::on_saveSettingsButton_clicked()
{

    Settings s;
    if (ui->nameLine->text().isEmpty() || ui->txtIPAddress->text().isEmpty() || ui->txtPort->text().isEmpty() )
    {
        QMessageBox::warning(this, tr("Remote OM"), tr("Please enter all required settings"));
        return;
    }

    //Adding new entry
    if (ui->newentrySettingsButton->isHidden() && !ui->nameLine->text().isEmpty())
    {
        //Check name if exists
        for (int i = 0; i < items.count(); i++ )
        {
            int t = QString::compare(items.keys().at(i), ui->nameLine->text(), Qt::CaseInsensitive);
            if (t == 0)
            {
                QMessageBox::warning(this, tr("Remote OM"), tr("Setting with same name already exists"));
                return;
            }
        }
    }

    bool found = false;
    if (!items.isEmpty())
    {
        for (int i = 0; i < items.count(); i++ )
        {
            int t = QString::compare(items.keys().at(i), ui->nameLine->text(), Qt::CaseInsensitive);
            if (t == 0)
            {
                found = true;
                break;
            }
        }
    }

    if (found)
    {
        //Update existing item
        items[ui->nameLine->text()] = ui->txtIPAddress->text()+";"+ui->txtPort->text()+";"+ui->txtPassword->text();
    }
    else
    {
        //Add new item
        items.insert(ui->nameLine->text(), ui->txtIPAddress->text()+";"+ui->txtPort->text()+";"+ui->txtPassword->text());
    }


    if (!s.saveXmlFile(items))
    {
        QMessageBox::warning(this, tr("Remote OM"), tr("Saving settings failed."));
        return;
    }

    /*if (!s.saveXmlFile(ui->nameLine->text(), ui->txtIPAddress->text(), ui->txtPort->text(), ui->txtPassword->text()))
    {
        QMessageBox::warning(this, tr("Remote OM"), tr("Saving settings failed."));
        return;
    }*/

    QMessageBox::information(this, tr("Remote OM"), tr("Settings saved."));

    if (ui->comboSettings->currentIndex() == -1)
    {
        connect(ui->comboSettings, SIGNAL(currentIndexChanged(QString)), this, SLOT(activeComboBox(QString)));
    }

    if (found == false)
    {
        ui->comboSettings->clear();
        ui->comboSettings->addItems(items.keys());

        ui->newentrySettingsButton->show();
        ui->delete_entrySettingsButton->show();
        ui->backButton->hide();
    }

    ui->nameLine->hide();
    ui->labelName->hide();
    ui->comboSettings->show();
    ui->labelSettings->show();

    if (!s.readXmlFile(items))
    {
        return;
    }

    QStringList list = items[ui->comboSettings->currentText()].split(";");
    if (!list.isEmpty())
    {
        ui->txtIPAddress->setText(list[0]);
        ui->txtPort->setText(list[1]);
        ui->txtPassword->setText(list[2]);

        set_ipaddress = list[0];
        set_port = list[1];
        set_password = list[2];
//.........这里部分代码省略.........
开发者ID:Adminotech,项目名称:remoteom,代码行数:101,代码来源:settingsdialog.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ currentItem函数代码示例发布时间:2022-05-30
下一篇:
C++ currentId函数代码示例发布时间: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