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

C++ setTabOrder函数代码示例

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

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



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

示例1: while

void QwtPlot::updateTabOrder()
{
    if ( d_data->canvas->focusPolicy() == Qt::NoFocus )
        return;
    if ( d_data->legend.isNull()
        || d_data->layout->legendPosition() == ExternalLegend
        || d_data->legend->legendItems().count() == 0 )
    {
        return;
    }

    // Depending on the position of the legend the
    // tab order will be changed that the canvas is
    // next to the last legend item, or before
    // the first one.

    const bool canvasFirst =
        d_data->layout->legendPosition() == QwtPlot::BottomLegend ||
        d_data->layout->legendPosition() == QwtPlot::RightLegend;

    QWidget *previous = NULL;

    QWidget *w = d_data->canvas;
    while ( ( w = w->nextInFocusChain() ) != d_data->canvas )
    {
        bool isLegendItem = false;
        if ( w->focusPolicy() != Qt::NoFocus
            && w->parent() && w->parent() == d_data->legend->contentsWidget() )
        {
            isLegendItem = true;
        }

        if ( canvasFirst )
        {
            if ( isLegendItem )
                break;

            previous = w;
        }
        else
        {
            if ( isLegendItem )
                previous = w;
            else
            {
                if ( previous )
                    break;
            }
        }
    }

    if ( previous && previous != d_data->canvas )
        setTabOrder( previous, d_data->canvas );
}
开发者ID:Alex-Rongzhen-Huang,项目名称:OpenPilot,代码行数:54,代码来源:qwt_plot.cpp


示例2: IGUICheckBox

//! constructor
CGUICheckBox::CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
: IGUICheckBox(environment, parent, id, rectangle), checkTime(0), Pressed(false), Checked(checked)
{
	#ifdef _DEBUG
	setDebugName("CGUICheckBox");
	#endif

	// this element can be tabbed into
	setTabStop(true);
	setTabOrder(-1);
}
开发者ID:Badcreature,项目名称:sagcg,代码行数:12,代码来源:CGUICheckBox.cpp


示例3: IGUIWindow

	//! constructor
	CGUIWindow::CGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, SINT32 id, rect<SINT32> rectangle)
		: IGUIWindow(environment, parent, id, rectangle), Dragging(false), IsDraggable(true), DrawBackground(true), DrawTitlebar(true), IsActive(false)
	{
#ifdef _DEBUG
		setDebugName("CGUIWindow");
#endif

		IGUISkin* skin = 0;
		if (environment)
			skin = environment->getSkin();

		CurrentIconColor = ColourValue::getColourValue(255, 255, 255, 255);

		SINT32 buttonw = 15;
		if (skin)
		{
			buttonw = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);
		}
		SINT32 posx = RelativeRect.getWidth() - buttonw - 4;

		CloseButton = Environment->addButton(rect<SINT32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
			L"", skin ? skin->getDefaultText(EGDT_WINDOW_CLOSE) : L"Close");
		CloseButton->setSubElement(true);
		CloseButton->setTabStop(false);
		CloseButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
		posx -= buttonw + 2;

		RestoreButton = Environment->addButton(rect<SINT32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
			L"", skin ? skin->getDefaultText(EGDT_WINDOW_RESTORE) : L"Restore");
		RestoreButton->setVisible(false);
		RestoreButton->setSubElement(true);
		RestoreButton->setTabStop(false);
		RestoreButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);
		posx -= buttonw + 2;

		MinButton = Environment->addButton(rect<SINT32>(posx, 3, posx + buttonw, 3 + buttonw), this, -1,
			L"", skin ? skin->getDefaultText(EGDT_WINDOW_MINIMIZE) : L"Minimize");
		MinButton->setVisible(false);
		MinButton->setSubElement(true);
		MinButton->setTabStop(false);
		MinButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_UPPERLEFT);

		MinButton->grab();
		RestoreButton->grab();
		CloseButton->grab();

		// this element is a tab group
		setTabGroup(true);
		setTabStop(true);
		setTabOrder(-1);

		refreshSprites();
		updateClientRect();
	}
开发者ID:zxycode007,项目名称:Sapphire,代码行数:55,代码来源:SapphireCGUIWindow.cpp


示例4: TabContent

WebBrowser::WebBrowser(QWidget *parent) : TabContent(parent),
  m_layout(new QVBoxLayout(this)),
  m_toolBar(new QToolBar(tr("Navigation panel"), this)),
  m_webView(new WebViewer(this)),
  m_txtLocation(new LocationLineEdit(this)),
  m_btnDiscoverFeeds(new DiscoverFeedsButton(this)),
  m_actionBack(m_webView->pageAction(QWebEnginePage::Back)),
  m_actionForward(m_webView->pageAction(QWebEnginePage::Forward)),
  m_actionReload(m_webView->pageAction(QWebEnginePage::Reload)),
  m_actionStop(m_webView->pageAction(QWebEnginePage::Stop)) {

  // Initialize the components and layout.
  initializeLayout();

  setTabOrder(m_txtLocation, m_toolBar);
  setTabOrder(m_toolBar, m_webView);

  createConnections();
  reloadFontSettings();
}
开发者ID:keinkurt,项目名称:rssguard,代码行数:20,代码来源:webbrowser.cpp


示例5: setPassword

void KPasswordDialog::setKnownLogins(const QMap<QString, QString> &knownLogins)
{
    const int nr = knownLogins.count();
    if (nr == 0) {
        return;
    }

    if (nr == 1) {
        d->ui.userEdit->setText(knownLogins.begin().key());
        setPassword(knownLogins.begin().value());
        return;
    }

    Q_ASSERT(!d->ui.userEdit->isReadOnly());
    if (!d->userEditCombo) {
        int row = -1;
        QFormLayout::ItemRole userEditRole = QFormLayout::FieldRole;

        d->ui.formLayout->getWidgetPosition(d->ui.userEdit, &row, &userEditRole);
        d->ui.formLayout->removeWidget(d->ui.userEdit);
        delete d->ui.userEdit;
        d->userEditCombo = new QComboBox(d->ui.credentialsGroup);
        d->userEditCombo->setEditable(true);
        d->ui.userEdit = d->userEditCombo->lineEdit();
        d->ui.userNameLabel->setBuddy(d->userEditCombo);
        d->ui.formLayout->setWidget(row > -1 ? row : 0, userEditRole, d->userEditCombo);

        setTabOrder(d->ui.userEdit, d->ui.anonymousRadioButton);
        setTabOrder(d->ui.anonymousRadioButton, d->ui.domainEdit);
        setTabOrder(d->ui.domainEdit, d->ui.passEdit);
        setTabOrder(d->ui.passEdit, d->ui.keepCheckBox);
        connect(d->ui.userEdit, SIGNAL(returnPressed()), d->ui.passEdit, SLOT(setFocus()));
    }

    d->knownLogins = knownLogins;
    d->userEditCombo->addItems(knownLogins.keys());
    d->userEditCombo->setFocus();

    connect(d->userEditCombo, SIGNAL(activated(QString)),
            this, SLOT(activated(QString)));
}
开发者ID:KDE,项目名称:kwidgetsaddons,代码行数:41,代码来源:kpassworddialog.cpp


示例6: QDialog

Query::Query( QWidget* parent,  const char* name, bool modal, Qt::WFlags fl, QString text, QString titel )
		: QDialog( parent )
{
	setWindowTitle( titel );
	setWindowIcon(loadIcon("AppIcon.png"));
	setModal(modal);
	queryLayout = new QVBoxLayout( this );
	queryLayout->setMargin(5);
	queryLayout->setSpacing(10);
	editLayout = new QHBoxLayout;
	editLayout->setSpacing( 5 );
	editLayout->setMargin( 0 );
	answerEdit = new QLineEdit( this );
	questionLabel = new QLabel( text, this );
	questionLabel->setBuddy(answerEdit);
	questionLabel->adjustSize();
	editLayout->addWidget( questionLabel );
	editLayout->addWidget( answerEdit );
	queryLayout->addLayout( editLayout );
	okCancelLayout = new QHBoxLayout;
	okCancelLayout->setSpacing( 5 );
	okCancelLayout->setMargin( 0 );
	QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
	okCancelLayout->addItem( spacer );
	okButton = new QPushButton( CommonStrings::tr_OK, this);
	okButton->setDefault( true );
	okCancelLayout->addWidget( okButton );
	cancelButton = new QPushButton( CommonStrings::tr_Cancel, this );
	okCancelLayout->addWidget( cancelButton );
	queryLayout->addLayout( okCancelLayout );
	setMaximumSize(sizeHint());
	answerEdit->setFocus();

	// signals and slots connections
	connect( okButton, SIGNAL( clicked() ), this, SLOT( Leave() ) );
	connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );

	// tab order
	setTabOrder( answerEdit, okButton );
	setTabOrder( okButton, cancelButton );
}
开发者ID:pvanek,项目名称:scribus-cuba-1.5.0,代码行数:41,代码来源:query.cpp


示例7: setTabOrder

void UIMachineSettingsGeneral::setOrderAfter (QWidget *aWidget)
{
    /* Basic tab-order */
    setTabOrder (aWidget, mTwGeneral->focusProxy());
    setTabOrder (mTwGeneral->focusProxy(), m_pNameAndSystemEditor);

    /* Advanced tab-order */
    setTabOrder (m_pNameAndSystemEditor, mPsSnapshot);
    setTabOrder (mPsSnapshot, mCbClipboard);
    setTabOrder (mCbClipboard, mCbDragAndDrop);
    setTabOrder (mCbDragAndDrop, mCbSaveMounted);
    setTabOrder (mCbSaveMounted, mCbShowToolBar);
    setTabOrder (mCbShowToolBar, mCbToolBarAlignment);

    /* Description tab-order */
    setTabOrder (mCbToolBarAlignment, mTeDescription);
}
开发者ID:mutoso-mirrors,项目名称:vbox,代码行数:17,代码来源:UIMachineSettingsGeneral.cpp


示例8: setupUi

CDlgSetMashen::CDlgSetMashen(QWidget * parent,QWidget *pMain):QDialog(parent)
{
    setupUi(this);
    pMainForm = pMain;
    QComboBox *cmb[DLG_SET_MASHEN_COMBOBOX_NUM];
    cmb[0] = m_cmbb_ap;
    cmb[1] =m_cmbb_speed;


    //增加选择项
     QStringList items;
     items<<"±10μv"<<"±20μv"<<"±40μv"
         <<"±80μv"<<"±100μv"<<"±150μv"<<"±200μv";
    cmb[0]->addItems(items);
    items.clear();
    items<<"6.25mm/s"<<"12.5mm/s"<<"25mm/s";
    cmb[1]->addItems(items);

    for(int i=0;i< DLG_SET_MASHEN_COMBOBOX_NUM;i++)
    {
        cmb[i]->installEventFilter(this);
        //设置光标顺序
        if(i == (DLG_SET_MASHEN_COMBOBOX_NUM-1))
            break;
        setTabOrder(cmb[i],cmb[i+1]);
    }
    setTabOrder(cmb[DLG_SET_MASHEN_COMBOBOX_NUM-1],m_btn_ok);
    setTabOrder(m_btn_ok,m_btn_cancel);
    setTabOrder(m_btn_cancel,cmb[0]);
    cmb[0]->setFocus();
    stAnaesDepModuCfg cfg;
    g_AnaesModule->f_get_cfg(&cfg);
    m_cmbb_ap->setCurrentIndex(cfg.m_wave_amp);
    m_cmbb_speed->setCurrentIndex(cfg.m_wave_speed);
    iCursor = 0;
    bCursorSta = false;
    m_btn_ok->installEventFilter(this);
    m_btn_cancel->installEventFilter(this);
     connect(m_btn_ok,SIGNAL(clicked()),this,SLOT(do_ok_clicked()));
     connect(m_btn_cancel,SIGNAL(clicked()),this,SLOT(do_cancel_clicked()));
}
开发者ID:zyzzyva8421,项目名称:monitor,代码行数:41,代码来源:dlg_set_mashen.cpp


示例9: QDialog

// ===================================== PopularUrlsDlg ======================================
PopularUrlsDlg::PopularUrlsDlg():
        QDialog(krMainWindow)
{
    setWindowTitle(i18n("Popular URLs"));
    setWindowModality(Qt::WindowModal);

    QVBoxLayout *mainLayout = new QVBoxLayout;
    setLayout(mainLayout);

    QGridLayout *layout = new QGridLayout;
    layout->setContentsMargins(0, 0, 0, 0);

    // listview to contain the urls
    urls = new KrTreeWidget(this);
    urls->header()->hide();
    urls->setSortingEnabled(false);
    urls->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);

    // quick search
    search = new KTreeWidgetSearchLine(this, urls);
    QLabel *lbl = new QLabel(i18n("&Search:"), this);
    lbl->setBuddy(search);

    layout->addWidget(lbl, 0, 0);
    layout->addWidget(search, 0, 1);
    layout->addWidget(urls, 1, 0, 1, 2);

    mainLayout->addLayout(layout);

    QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
    mainLayout->addWidget(buttonBox);

    setTabOrder(search, urls);
    setTabOrder((QWidget *)urls, buttonBox->button(QDialogButtonBox::Close));

    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
    connect(urls, SIGNAL(activated(const QModelIndex &)),
            this, SLOT(slotItemSelected(const QModelIndex &)));
    connect(search, SIGNAL(hiddenChanged(QTreeWidgetItem *, bool)),
            this, SLOT(slotVisibilityChanged()));
}
开发者ID:aremai,项目名称:krusader,代码行数:42,代码来源:popularurls.cpp


示例10: ConfigDialogBase

DatabaseConfig::DatabaseConfig( QWidget* parent )
    : ConfigDialogBase( parent )
{
    setupUi( this );

    // Fix some weird tab orderness
    setTabOrder( kcfg_Host,     kcfg_Port );        // host to port
    setTabOrder( kcfg_Port,     kcfg_User );        // port to username
    setTabOrder( kcfg_User,     kcfg_Password );    // username to password
    setTabOrder( kcfg_Password, kcfg_Database );    // password to database

    connect( kcfg_UseServer, SIGNAL( stateChanged(int) ), SLOT( toggleExternalConfigAvailable(int) ) );

    connect( kcfg_Database, SIGNAL( textChanged(const QString &) ), SLOT( updateSQLQuery() ) );
    connect( kcfg_User,     SIGNAL( textChanged(const QString &) ), SLOT( updateSQLQuery() ) );
    connect( kcfg_Host,     SIGNAL( textChanged(const QString &) ), SLOT( updateSQLQuery() ) );

    toggleExternalConfigAvailable( kcfg_UseServer->checkState() );

    updateSQLQuery();
}
开发者ID:ErrAza,项目名称:amarok,代码行数:21,代码来源:DatabaseConfig.cpp


示例11: QDialog

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

    setTabOrder(ui->nameEdit, ui->selectFileButton);
    setTabOrder(ui->selectFileButton, ui->directoryEdit);
    setTabOrder(ui->directoryEdit, ui->selectDirButton);
    setTabOrder(ui->selectDirButton, ui->includeSubdirectories);
    setTabOrder(ui->includeSubdirectories, ui->buildButton);
    setTabOrder(ui->buildButton, ui->cancelButton);

    m_canceled = true;

    connect(ui->buildButton,
            SIGNAL(pressed()),
            this,
            SLOT(buildButtonPressed()));
    connect(ui->selectDirButton,
            SIGNAL(pressed()),
            this,
            SLOT(selectDirButtonPressed()));
    connect(ui->cancelButton,
            SIGNAL(pressed()),
            this,
            SLOT(cancelButtonPressed()));
    connect(ui->selectFileButton,
            SIGNAL(pressed()),
            this,
            SLOT(selectFileButtonPressed()));
    this->readSettings();
}
开发者ID:seanet7or,项目名称:mosaicit,代码行数:33,代码来源:newdatabasedlg.cpp


示例12: IGUIComboBox

//! constructor
CGUIComboBox::CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent,
	s32 id, core::rect<s32> rectangle)
	: IGUIComboBox(environment, parent, id, rectangle),
	ListButton(0), SelectedText(0), ListBox(0), LastFocus(0),
	Selected(-1), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_CENTER), MaxSelectionRows(5), HasFocus(false),
	ActiveFont(0)
{
	#ifdef _DEBUG
	setDebugName("CGUIComboBox");
	#endif

	IGUISkin* skin = Environment->getSkin();

	s32 width = 15;
	if (skin)
		width = skin->getSize(EGDS_WINDOW_BUTTON_WIDTH);

	core::rect<s32> r;
	r.UpperLeftCorner.X = rectangle.getWidth() - width - 2;
	r.LowerRightCorner.X = rectangle.getWidth() - 2;

	r.UpperLeftCorner.Y = 2;
	r.LowerRightCorner.Y = rectangle.getHeight() - 2;

	ListButton = Environment->addButton(r, this, -1, L"");
	if (skin && skin->getSpriteBank())
	{
		ListButton->setSpriteBank(skin->getSpriteBank());
		ListButton->setSprite(EGBS_BUTTON_UP, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL));
		ListButton->setSprite(EGBS_BUTTON_DOWN, skin->getIcon(EGDI_CURSOR_DOWN), skin->getColor(EGDC_WINDOW_SYMBOL));
	}
	ListButton->setAlignment(EGUIA_LOWERRIGHT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
	ListButton->setSubElement(true);
	ListButton->setTabStop(false);

	r.UpperLeftCorner.X = 2;
	r.UpperLeftCorner.Y = 2;
	r.LowerRightCorner.X = RelativeRect.getWidth() - (ListButton->getAbsolutePosition().getWidth() + 2);
	r.LowerRightCorner.Y = RelativeRect.getHeight() - 2;

	SelectedText = Environment->addStaticText(L"", r, false, false, this, -1, false);
	SelectedText->setSubElement(true);
	SelectedText->setAlignment(EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT, EGUIA_UPPERLEFT, EGUIA_LOWERRIGHT);
	SelectedText->setTextAlignment(EGUIA_UPPERLEFT, EGUIA_CENTER);
	if (skin)
		SelectedText->setOverrideColor(skin->getColor(EGDC_BUTTON_TEXT));
	SelectedText->enableOverrideColor(true);

	// this element can be tabbed to
	setTabStop(true);
	setTabOrder(-1);
}
开发者ID:vgck,项目名称:irrnacht,代码行数:53,代码来源:CGUIComboBox.cpp


示例13: setPassword

void KPasswordDialog::setKnownLogins( const QMap<QString, QString>& knownLogins )
{
    const int nr = knownLogins.count();
    if ( nr == 0 ) {
        return;
    }

    if ( nr == 1 ) {
        d->ui.userEdit->setText( knownLogins.begin().key() );
        setPassword( knownLogins.begin().value() );
        return;
    }

    Q_ASSERT( !d->ui.userEdit->isReadOnly() );
    if ( !d->userEditCombo ) {
        d->ui.formLayout->removeWidget(d->ui.userEdit);
        delete d->ui.userEdit;
        d->userEditCombo = new QComboBox(this);
        d->userEditCombo->setEditable(true);
        d->ui.userEdit = d->userEditCombo->lineEdit();
//        QSize s = d->userEditCombo->sizeHint();
//        d->ui.userEditCombo->setFixedHeight( s.height() );
//        d->ui.userEditCombo->setMinimumWidth( s.width() );
        d->ui.userNameLabel->setBuddy( d->userEditCombo );
        d->ui.formLayout->setWidget( d->commentRow, QFormLayout::FieldRole, d->userEditCombo );
        setTabOrder( d->ui.userEdit, d->ui.anonymousCheckBox );
        setTabOrder( d->ui.anonymousCheckBox, d->ui.domainEdit );
        setTabOrder( d->ui.domainEdit, d->ui.passEdit );
        setTabOrder( d->ui.passEdit, d->ui.keepCheckBox );
        connect( d->ui.userEdit, SIGNAL(returnPressed()), d->ui.passEdit, SLOT(setFocus()) );
    }

    d->knownLogins = knownLogins;
    d->userEditCombo->addItems( knownLogins.keys() );
    d->userEditCombo->setFocus();

    connect( d->userEditCombo, SIGNAL(activated(QString)),
             this, SLOT(activated(QString)) );
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:39,代码来源:kpassworddialog.cpp


示例14: SnippetDlgBase

/*
 *  Constructs a SnippetDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
SnippetDlg::SnippetDlg(KActionCollection *ac, QWidget *parent, const char *name, bool modal, WFlags fl)
    : SnippetDlgBase(parent, name, modal, fl), actionCollection(ac)
{
    if(!name)
        setName("SnippetDlg");

    textLabel3 = new QLabel(this, "textLabel3");
    keyButton = new KKeyButton(this);
    connect(keyButton, SIGNAL(capturedShortcut(const KShortcut &)),
            this, SLOT(slotCapturedShortcut(const KShortcut &)));

    layout3->addWidget(textLabel3, 7, 0);
    layout3->addWidget(keyButton, 7, 1);

    // tab order
    setTabOrder(snippetText, keyButton);
    setTabOrder(keyButton, btnAdd);
    setTabOrder(btnAdd, btnCancel);

    textLabel3->setBuddy(keyButton);
    languageChange();
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:29,代码来源:snippetdlg.cpp


示例15: setupUi

CDlgAlmCO2::CDlgAlmCO2(QWidget * parent,QWidget *pMain):QDialog(parent)
{
    setupUi(this);
    iCursor = 0;
    bCursorSta = false;
    pMainForm = pMain;
    QComboBox *cmb[DLG_ALM_CO2_COMBOBOX_NUM];
    cmb[0] = m_cmbb_huxilv;
    cmb[1] =m_cmbb_hu;
    cmb[2] =m_cmbb_xi;
    QSpinBox * spb[DLG_ALM_CO2_SPB_NUM];
    spb[0] = m_spb_huxi_high;
    spb[1] = m_spb_huxi_low;
    spb[2] = m_spb_hu_high;
    spb[3] = m_spb_hu_low;
    spb[4] = m_spb_xi_high;
    spb[5] = m_spb_xi_low;

    //增加选择项
     QStringList items;
     items<<"关"<<"开";

    for(int i=0;i< DLG_ALM_CO2_COMBOBOX_NUM;i++)
    {
        cmb[i]->installEventFilter(this);
        cmb[i]->addItems(items);
        //设置光标顺序
        setTabOrder(cmb[i],spb[i*2]);
        setTabOrder(spb[i*2],spb[i*2+1]);

        if(i == (DLG_ALM_CO2_COMBOBOX_NUM-1))
            break;
        setTabOrder(spb[i*2+1],cmb[i+1]);
    }
     setTabOrder(spb[DLG_ALM_CO2_SPB_NUM-1],m_btn_ok);
     setTabOrder(m_btn_ok,m_btn_cancel);
     setTabOrder(m_btn_cancel,cmb[0]);
    cmb[0]->setFocus();
    stCO2ModuCfg cfg;
    g_CO2Module->f_get_cfg(&cfg);
     m_cmbb_huxilv->setCurrentIndex(cfg.m_alarm_breathrate_en);
     m_spb_huxi_high->setValue(cfg.m_alarm_breathrate_high);
     m_spb_huxi_low->setValue(cfg.m_alarm_breathrate_low);
     m_cmbb_hu->setCurrentIndex(cfg.m_alarm_humo_en);
     m_spb_hu_high->setValue(cfg.m_alarm_humo_high);
     m_spb_hu_low->setValue(cfg.m_alarm_humo_low);
     m_cmbb_xi->setCurrentIndex(cfg.m_alarm_xiru_en);
     m_spb_xi_high->setValue(cfg.m_alarm_xiru_high);
     m_spb_xi_low->setValue(cfg.m_alarm_xiru_low);
     for(int i = 0; i<DLG_ALM_CO2_SPB_NUM;i++)
     {
         spb[i]->installEventFilter(this);
     }
     m_btn_ok->installEventFilter(this);
     m_btn_cancel->installEventFilter(this);
     connect(m_btn_ok,SIGNAL(clicked()),this,SLOT(do_ok_clicked()));
     connect(m_btn_cancel,SIGNAL(clicked()),this,SLOT(do_cancel_clicked()));
}
开发者ID:zyzzyva8421,项目名称:monitor,代码行数:58,代码来源:dlg_alm_co2.cpp


示例16: QWidget

ChatWindow::ChatWindow(QWidget *parent)
  : QWidget(parent)
{
  QVBoxLayout *lay = new QVBoxLayout(this);
  QSplitter *splitter = new QSplitter(Qt::Vertical, this);
  lay->addWidget(splitter);
  conversationView = new QTextBrowser;
  chatEdit = new QTextEdit;
  splitter->addWidget(conversationView);
  splitter->addWidget(chatEdit);
  chatEdit->installEventFilter(this);
  setWindowTitle(tr("Chat Window"));
  setTabOrder(chatEdit, conversationView);
};
开发者ID:bingo2011,项目名称:codes_TheBookOfQT4,代码行数:14,代码来源:chatwindow.cpp


示例17: QPushButton

void ShortcutButton::addShortcut(const QKeySequence &shortcut)
{
    if ( shortcut.isEmpty() || shortcuts().contains(shortcut) )
        return;

    auto button = new QPushButton(this);
    const int buttonIndex = shortcutCount();
    m_layout->insertWidget(buttonIndex, button, 1);

    setTabOrder(m_buttonAddShortcut, button);

    connect( button, &QAbstractButton::clicked,
             this, &ShortcutButton::onShortcutButtonClicked );
    setButtonShortcut(button, shortcut);
    emit shortcutAdded(shortcut);
}
开发者ID:m4r71n,项目名称:CopyQ,代码行数:16,代码来源:shortcutbutton.cpp


示例18: IGUIButton

//! constructor
CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent,
			s32 id, core::rect<s32> rectangle, bool noclip)
: IGUIButton(environment, parent, id, rectangle),
	SpriteBank(0), OverrideFont(0),
	ClickTime(0), HoverTime(0), FocusTime(0),
	IsPushButton(false), Pressed(false),
	UseAlphaChannel(false), DrawBorder(true), ScaleImage(false)
{
	#ifdef _DEBUG
	setDebugName("CGUIButton");
	#endif
	setNotClipped(noclip);

	// This element can be tabbed.
	setTabStop(true);
	setTabOrder(-1);
}
开发者ID:Smile-DK,项目名称:ygopro-222DIY-mobile,代码行数:18,代码来源:CGUIButton.cpp


示例19: QWidget

QAdakDate::QAdakDate(QWidget * parent) : QWidget(parent)
{
    line_edit    = new QLineEdit(this);
    line_edit->setObjectName("adak_date_line_edit");
    line_edit->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
    line_edit->installEventFilter(this);
    line_edit->setMaxLength(100);
    connect(line_edit,SIGNAL(editingFinished()),this,SLOT(SLOT_SET_DATE()));

    tool_button  = new QToolButton(this);
    tool_button->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
    tool_button->setToolButtonStyle(Qt::ToolButtonIconOnly);
    tool_button->setIcon(QIcon(":/kernel_icons/kernel_calendar_ikonu.png"));
    tool_button->setObjectName("adak_date_tool_button");
    tool_button->setMaximumSize(32,line_edit->height() - 9);
    tool_button->setIconSize(QSize(tool_button->width(),line_edit->height() - 9));
    tool_button->setFocusPolicy(Qt::ClickFocus);
    connect(tool_button,SIGNAL(clicked()),this,SLOT(SLOT_POPUP_BUTTON_CLICKED()));

    calendar_widget = new QCalendarWidget(this);
    calendar_widget->setFirstDayOfWeek ( Qt::Monday );
    calendar_widget->setDateRange(MALI_YIL_FIRST_DATE(), MALI_ARRAY_LAST_DATE());
    calendar_widget->setWindowFlags(Qt::Popup);
    calendar_widget->close();
    connect(calendar_widget,SIGNAL(clicked(QDate)),this,SLOT(SLOT_POPUP_DATE_SELECTED(QDate)));

    h_box_layout = new QHBoxLayout(this);
    h_box_layout->setContentsMargins(0,0,0,0);
    h_box_layout->setSpacing(0);
    h_box_layout->addWidget(line_edit);
    h_box_layout->addWidget(tool_button);

    setLayout       (h_box_layout);
    setFocusPolicy  (Qt::StrongFocus);
    setFocusProxy   (line_edit);
    setMaximumHeight(line_edit->height());
    setTabOrder     (line_edit,tool_button);

    m_mali_yil_disable  = false;
    m_date_changed      = false;
    m_current_date      = QDate::currentDate();
    m_old_date          = QDate::currentDate();

    SET_DATE_FORMAT ("dd MMMM yyyy dddd");
    SET_DATE        (QDate::currentDate());
}
开发者ID:coolixwebgraphics,项目名称:FRAMEWORK,代码行数:46,代码来源:QAdakDate.cpp


示例20: setTabOrder

void AddContactBox::prepare() {
	if (_invertOrder) {
		setTabOrder(_last, _first);
	}
	if (_user) {
		setTitle(lang(lng_edit_contact_title));
	} else {
		bool readyToAdd = !_phone->getLastText().isEmpty() && (!_first->getLastText().isEmpty() || !_last->getLastText().isEmpty());
		setTitle(lang(readyToAdd ? lng_confirm_contact_data : lng_enter_contact_data));
	}
	updateButtons();

	connect(_first, SIGNAL(submitted(bool)), this, SLOT(onSubmit()));
	connect(_last, SIGNAL(submitted(bool)), this, SLOT(onSubmit()));
	connect(_phone, SIGNAL(submitted(bool)), this, SLOT(onSubmit()));

	setDimensions(st::boxWideWidth, st::contactPadding.top() + _first->height() + st::contactSkip + _last->height() + st::contactPhoneSkip + _phone->height() + st::contactPadding.bottom() + st::boxPadding.bottom());
}
开发者ID:Igevorse,项目名称:tdesktop,代码行数:18,代码来源:addcontactbox.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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