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

C++ button函数代码示例

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

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



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

示例1: AMGraphicsViewWizard

AMSimpleBeamConfigurationWizard::AMSimpleBeamConfigurationWizard(QWidget *parent)
	: AMGraphicsViewWizard(parent)
{
	setNumberOfPoints(3);
	setNumberOfPages(numberOfPoints());
	setFreePage(Page_Free);

	coordinateListAppend(new QVector3D(0,0,0));
	coordinateListAppend(new QVector3D(0,2,0));
	coordinateListAppend(new QVector3D(0,-2,0));

	setPage(Page_Intro, new AMWizardPage);
	setPage(Page_Option, new AMWizardOptionPage);
	setPage(Page_Final, new AMWizardPage);
	for(int i = 0; i < numberOfPages(); i++)
	{
		setPage(pageWait(i), new AMSimpleBeamConfigurationWaitPage);
		setPage(pageSet(i), new AMSimpleBeamConfigurationSetPage);
		connect(page(pageSet(i)), SIGNAL(initBeamShape()), this, SLOT(initBeamShape()));
		connect(page(pageSet(i)), SIGNAL(signalMousePressed(QPointF)), this, SLOT(mousePressedHandler(QPointF)));
		connect(page(pageSet(i)), SIGNAL(moveBeamShape(QPointF)), this, SLOT(moveBeamShapeHandler(QPointF)));
	}

	setStartId(Page_Intro);
	setOption(HaveHelpButton, true);
	connect(this, SIGNAL(helpRequested()), this, SLOT(showHelp()));

	setWindowTitle(message(Wizard_Title));

	disconnect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));
	connect(button(QWizard::BackButton), SIGNAL(clicked()), this, SLOT(back()));

	setMinimumSize(600,600);

	/// Add options button to intro page
	addOptionPage(Page_Intro);

}
开发者ID:acquaman,项目名称:acquaman,代码行数:38,代码来源:AMSimpleBeamConfigurationWizard.cpp


示例2: aboutDialog

void NotificationIcon::about_dialog(){
    QDialog aboutDialog(0, Qt::WindowTitleHint | Qt::WindowSystemMenuHint);
    QLabel l("<h1>MiptTelecomBalance</h1>\
            \nThis program allows you to monitor\n\
            the balance of your personal account\n\
            in \"MIPT-TELECOM\"\n\
            Authors:");
    l.setWordWrap(true);
    QLabel l1, l2, l3;
    l1.setText("<h3>Lantsov Alexander</h3>");
    l2.setText("<h3>Kudinova Marina</h3>");
    l3.setText("<h3>Alekseeva Maria</h3>");
    
    QString img[4] = { AttentionPath, PositivePath, NegativePath, ProblemPath };
    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
    
    QLabel lp1, lp2, lp3;
    QPixmap p1(img[qrand() % 4]);
    QPixmap p2(img[qrand() % 4]);
    QPixmap p3(img[qrand() % 4]);
    lp1.setPixmap(p1);
    lp2.setPixmap(p2);
    lp3.setPixmap(p3);
    
    lp1.setFixedSize(p1.width(),p1.height());
    lp2.setFixedSize(p2.width(),p2.height());    
    lp3.setFixedSize(p3.width(),p3.height());
    



    QPushButton button("OK");

    QGridLayout layout;
    layout.addWidget(&l  , 0, 0, 1, 2);
    layout.addWidget(&lp1, 1, 0);
    layout.addWidget(&l1 , 1, 1);
    layout.addWidget(&lp2, 2, 0);
    layout.addWidget(&l2 , 2, 1);
    layout.addWidget(&lp3, 3, 0);
    layout.addWidget(&l3 , 3, 1);
    layout.addWidget(&button, 4, 0, 1, 2);
    QObject::connect(&button, SIGNAL(clicked()), &aboutDialog, SLOT(accept()));
    aboutDialog.setLayout(&layout);
	aboutDialog.setWindowTitle("About");
    //aboutDialog.setFixedSize( aboutDialog.sizeHint() );
    layout.setSizeConstraint( QLayout::SetFixedSize );
    aboutDialog.show();
    aboutDialog.exec();
}
开发者ID:bobbybonifacia,项目名称:MiptTelecomBalance,代码行数:50,代码来源:notification_icon.cpp


示例3: button

void LLWidgetReg::initClass(bool register_widgets)
{
	// Only need to register if the Windows linker has optimized away the
	// references to the object files.
	if (register_widgets)
	{
		LLDefaultChildRegistry::Register<LLButton> button("button");
		LLDefaultChildRegistry::Register<LLMenuButton> menu_button("menu_button");
		LLDefaultChildRegistry::Register<LLCheckBoxCtrl> check_box("check_box");
		LLDefaultChildRegistry::Register<LLComboBox> combo_box("combo_box");
		LLDefaultChildRegistry::Register<LLFilterEditor> filter_editor("filter_editor");
		LLDefaultChildRegistry::Register<LLFlyoutButton> flyout_button("flyout_button");
		LLDefaultChildRegistry::Register<LLContainerView> container_view("container_view");
		LLDefaultChildRegistry::Register<LLIconCtrl> icon("icon");
		LLDefaultChildRegistry::Register<LLLoadingIndicator> loading_indicator("loading_indicator");
		LLDefaultChildRegistry::Register<LLLineEditor> line_editor("line_editor");
		LLDefaultChildRegistry::Register<LLMenuItemSeparatorGL> menu_item_separator("menu_item_separator");
		LLDefaultChildRegistry::Register<LLMenuItemCallGL> menu_item_call_gl("menu_item_call");
		LLDefaultChildRegistry::Register<LLMenuItemCheckGL> menu_item_check_gl("menu_item_check");
		LLDefaultChildRegistry::Register<LLMenuGL> menu("menu");
		LLDefaultChildRegistry::Register<LLMenuBarGL> menu_bar("menu_bar");
		LLDefaultChildRegistry::Register<LLContextMenu> context_menu("context_menu");
		LLDefaultChildRegistry::Register<LLMultiSlider> multi_slider_bar("multi_slider_bar");
		LLDefaultChildRegistry::Register<LLMultiSliderCtrl> multi_slider("multi_slider");
		LLDefaultChildRegistry::Register<LLPanel> panel("panel", &LLPanel::fromXML);
		LLDefaultChildRegistry::Register<LLLayoutStack> layout_stack("layout_stack");
		LLDefaultChildRegistry::Register<LLProgressBar> progress_bar("progress_bar");
		LLDefaultChildRegistry::Register<LLRadioGroup> radio_group("radio_group");
		LLDefaultChildRegistry::Register<LLSearchEditor> search_editor("search_editor");
		LLDefaultChildRegistry::Register<LLScrollContainer> scroll_container("scroll_container");
		LLDefaultChildRegistry::Register<LLScrollingPanelList> scrolling_panel_list("scrolling_panel_list");
		LLDefaultChildRegistry::Register<LLScrollListCtrl> scroll_list("scroll_list");
		LLDefaultChildRegistry::Register<LLSlider> slider_bar("slider_bar");
		LLDefaultChildRegistry::Register<LLSliderCtrl> slider("slider");
		LLDefaultChildRegistry::Register<LLSpinCtrl> spinner("spinner");
		LLDefaultChildRegistry::Register<LLStatBar> stat_bar("stat_bar");
		//LLDefaultChildRegistry::Register<LLPlaceHolderPanel> placeholder("placeholder");
		LLDefaultChildRegistry::Register<LLTabContainer> tab_container("tab_container");
		LLDefaultChildRegistry::Register<LLTextBox> text("text");
		LLDefaultChildRegistry::Register<LLTextEditor> simple_text_editor("simple_text_editor");
		LLDefaultChildRegistry::Register<LLUICtrl> ui_ctrl("ui_ctrl");
		LLDefaultChildRegistry::Register<LLStatView> stat_view("stat_view");
		//LLDefaultChildRegistry::Register<LLUICtrlLocate> locate("locate");
		//LLDefaultChildRegistry::Register<LLUICtrlLocate> pad("pad");
		LLDefaultChildRegistry::Register<LLViewBorder> view_border("view_border");
	}

	// *HACK: Usually this is registered as a viewer text editor
	LLDefaultChildRegistry::Register<LLTextEditor> text_editor("text_editor");
}
开发者ID:Xara,项目名称:Astra-Viewer-2,代码行数:50,代码来源:llwidgetreg.cpp


示例4: initPins

void ECKeyPad::dataChanged() {
    initPins(dataInt("numCols"));

    bool useToggle = dataBool("useToggles");
    bool bounce = dataBool("bounce");
    int bouncePeriod_ms = int(dataDouble("bounce_period") * 1e3);

    for (unsigned i = 0; i < 4; i++) {
        for (unsigned j = 0; j < m_numCols; j++) {
            button(buttonID(i, j))->setToggle(useToggle);
            m_switch[i][j]->setBounce(bounce, bouncePeriod_ms);
        }
    }
}
开发者ID:Munrek,项目名称:ktechlab,代码行数:14,代码来源:eckeypad.cpp


示例5: run_info_window

void run_info_window(){
	draw_3dbox(500,125,620,215,1);
	setlinestyle(SOLID_LINE,1,3);
	setcolor(1);
	line(502,125,618,125);
	setcolor(7);
	line(501,125,501,125);
	button(510,120,610,205,15,1);
	settextstyle(0,0,1);
	color_text(518,130,"Pressed:",4);
	color_text(518,150,"Correct:",4);
	color_text(518,170,"Wrong  :",4);
	color_text(518,190,"B.space:",4);
}
开发者ID:fnazmul,项目名称:Easy_Typing_Tutor,代码行数:14,代码来源:BGAD_LEV.CPP


示例6: QWizard

CompatDB::CompatDB(QWidget* parent)
    : QWizard(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint),
      ui{std::make_unique<Ui::CompatDB>()} {
    ui->setupUi(this);
    connect(ui->radioButton_Perfect, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(ui->radioButton_Great, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(ui->radioButton_Okay, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(ui->radioButton_Bad, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(ui->radioButton_IntroMenu, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(ui->radioButton_WontBoot, &QRadioButton::clicked, this, &CompatDB::EnableNext);
    connect(button(NextButton), &QPushButton::clicked, this, &CompatDB::Submit);
    connect(&testcase_watcher, &QFutureWatcher<bool>::finished, this,
            &CompatDB::OnTestcaseSubmitted);
}
开发者ID:citra-emu,项目名称:citra,代码行数:14,代码来源:compatdb.cpp


示例7: init_exportwin

void init_exportwin(void)
{
  short dummy;
  
  rsrc_gaddr(R_TREE,EXPORT,&export_win.dialog);
  strncpy(export_win.w_name,alerts[WN_EXPORT],MAXWINSTRING);
  export_win.attr=NAME|MOVE|CLOSE;
  export_win.icondata=NULL;
  export_win.status=WINDOW_CLOSED;
  export_win.type=TYPE_DIALOG;
  form_center(export_win.dialog, &dummy, &dummy, &dummy, &dummy);

  button(&export_win,EXPORT_TYPE_0,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_1,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_2,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_3,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_4,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_5,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_6,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_7,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_8,CLEAR_STATE,SELECTED,FALSE);
  button(&export_win,EXPORT_TYPE_9,CLEAR_STATE,SELECTED,FALSE);
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:23,代码来源:c_export.c


示例8: button

QAccessible::Role QAccessibleToolButton::role() const
{
    QAbstractButton *ab = button();

#ifndef QT_NO_MENU
    QToolButton *tb = qobject_cast<QToolButton*>(ab);
    if (!tb->menu())
        return tb->isCheckable() ? QAccessible::CheckBox : QAccessible::PushButton;
    else if (tb->popupMode() == QToolButton::DelayedPopup)
        return QAccessible::ButtonDropDown;
#endif

    return QAccessible::ButtonMenu;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:14,代码来源:simplewidgets.cpp


示例9: button

void MenuPanel::createButton(const ButtonInfo& info)
{
    std::unique_ptr<Button> button(new Button(info.id, info.style, m_position, info.position, info.triggers));

    button->registerOnPressed([this](const Button& sender)
    {
        if(m_clickCallback != nullptr)
            m_clickCallback(sender);
    });

    button->setToolTip(info.toolTip);
    button->setVisibleWhenId(info.visibleWhenId);
    m_elements.push_back(std::move(button));
}
开发者ID:Roflo,项目名称:spieleprogrammierer-forenprojekt,代码行数:14,代码来源:MenuPanel.cpp


示例10: setWindowIcon

QT_BEGIN_NAMESPACE

ConversionWizard::ConversionWizard()
{
    setWindowIcon(QIcon(QLatin1String(":/qt-project.org/qhelpconverter/assistant.png")));
    setWindowTitle(tr("Help Conversion Wizard"));
    setPixmap(QWizard::WatermarkPixmap,
        QPixmap(QLatin1String(":/qt-project.org/qhelpconverter/assistant-128.png"))) ;
    setOptions(QWizard::IndependentPages|QWizard::NoBackButtonOnLastPage
        |QWizard::HaveHelpButton);

    m_inputPage = new InputPage(&m_adpReader);
    setPage(Input_Page, m_inputPage);

    m_generalPage = new GeneralPage();
    setPage(General_Page, m_generalPage);

    m_filterPage = new FilterPage();
    setPage(Filter_Page, m_filterPage);
    m_filterPage->setMaximumHeight(240);

    m_identifierPage = new IdentifierPage();
    setPage(Identifier_Page, m_identifierPage);

    m_pathPage = new PathPage();
    setPage(Path_Page, m_pathPage);
    m_pathPage->setMaximumHeight(240);

    m_filesPage = new FilesPage();
    setPage(Files_Page, m_filesPage);
    m_filesPage->setMaximumHeight(240);

    m_outputPage = new OutputPage();
    setPage(Output_Page, m_outputPage);
    m_outputPage->setMaximumHeight(240);

    m_finishPage = new FinishPage();
    setPage(Finish_Page, m_finishPage);
    m_finishPage->setMaximumHeight(240);

    connect(this, SIGNAL(currentIdChanged(int)),
        this, SLOT(pageChanged(int)));

    m_helpWindow = 0;
    qApp->installEventFilter(this);

    QAbstractButton *btn = button(QWizard::HelpButton);
    btn->setCheckable(true);
    connect(btn, SIGNAL(toggled(bool)), this, SLOT(showHelp(bool)));
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:50,代码来源:conversionwizard.cpp


示例11: button

void DeleteDialog::keyPressEvent(QKeyEvent* e)
{
    if ( e->modifiers() == 0 )
    {
        if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return)
        {
            if (button(User1)->hasFocus())
            {
                e->accept();
                button(User1)->animateClick();
                return;
            }
            else if (button(Cancel)->hasFocus())
            {
                e->accept();
                button(Cancel)->animateClick();
                return;
            }
        }
    }

    KDialog::keyPressEvent(e);
}
开发者ID:UIKit0,项目名称:digikam,代码行数:23,代码来源:deletedialog.cpp


示例12: DIA_getPartial

uint8_t DIA_getPartial(PARTIAL_CONFIG *param,AVDMGenericVideoStream *son,AVDMGenericVideoStream *previous)
{
#define PX(x) &(param->x)
  void *params[2]={son,previous};
         uint32_t fmax=previous->getInfo()->nb_frames;
         if(fmax) fmax--;
         
         diaElemUInteger  start(PX(_start),QT_TR_NOOP("Partial Start Frame:"),0,fmax);
         diaElemUInteger  end(PX(_end),QT_TR_NOOP("Partial End Frame:"),0,fmax);
         diaElemButton    button(QT_TR_NOOP("Configure child"), partialCb,params);
         
         diaElem *tabs[]={&start,&end,&button};
        return diaFactoryRun(QT_TR_NOOP("Partial Video Filter"),3,tabs);
}
开发者ID:BackupTheBerlios,项目名称:avidemux,代码行数:14,代码来源:Q_mainfilter.cpp


示例13: button

ActivitiesButton::ActivitiesButton() {
  button()->setText("Activities");
  button()->setObjectName("ActivitiesButton");
  button()->setCheckable(true);
  button()->setChecked(true);
  // set icon
  button()->setIcon(QIcon(":/icons/Activity Monitor.ico"));
  button()->setIconSize(QSize(30, 30));
}
开发者ID:marosi,项目名称:SocialDesktopClient,代码行数:9,代码来源:activities_button.cpp


示例14: MouseProc

LRESULT CALLBACK MouseProc(_In_ int nCode, _In_ WPARAM wParam, _In_ LPARAM lParam)
{
	MSLLHOOKSTRUCT		*hookInfo;

	if (nCode >= HC_ACTION)
	{
		std::string		name;
		hookInfo = (MSLLHOOKSTRUCT*)lParam;
		Position pos(hookInfo->pt.x, hookInfo->pt.y);
		eEventType etype;
		switch (wParam)
		{
			case WM_LBUTTONDOWN:
				name = "Left Button Down";
				etype = Pressed;
				break;
			case WM_LBUTTONUP:
				name = "Left Button Up";
				etype = Released;
				break;
			case WM_MOUSEMOVE:
				name = "Mouse Move";
				etype = Move;
				break;
			case WM_MOUSEWHEEL:
				name = "Mouse Wheel (vertical scrolling)";
				etype = Scroll;
				break;
			case WM_MOUSEHWHEEL:
				name = "Mouse Wheel (horizontal scrolling)";
				etype = Scroll;
				break;
			case WM_RBUTTONDOWN:
				name = "Right Button Down";
				etype = Pressed;
				break;
			case WM_RBUTTONUP:
				name = "Right Button Up";
				etype = Released;
				break;
		}
		Button button(name, hookInfo->mouseData);

		clt.m_itime.now();
		MouseEvent *msEv = new MouseEvent(button, pos, etype, clt.m_itime.get_second(), clt.m_itime.get_nano(), getWindowName());
		clt.addEvent(msEv);
	}
	return (CallNextHookEx(NULL, nCode, wParam, lParam));
}
开发者ID:Kevin-Costa,项目名称:cpp_spider,代码行数:49,代码来源:Client.cpp


示例15: KPageDialog

KoDocumentInfoDlg::KoDocumentInfoDlg(QWidget* parent, KoDocumentInfo* docInfo)
    : KPageDialog(parent)
    , d(new KoDocumentInfoDlgPrivate)
{
    d->info = docInfo;

    setWindowTitle(i18n("Document Information"));
    //    setInitialSize(QSize(500, 500));
    setFaceType(KPageDialog::List);
    setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    button(QDialogButtonBox::Ok)->setDefault(true);

    d->aboutUi = new Ui::KoDocumentInfoAboutWidget();
    QWidget *infodlg = new QWidget();
    d->aboutUi->setupUi(infodlg);
    d->aboutUi->cbLanguage->addItems(KoGlobal::listOfLanguages());
    d->aboutUi->cbLanguage->setCurrentIndex(-1);

    KPageWidgetItem *page = new KPageWidgetItem(infodlg, i18n("General"));
    page->setHeader(i18n("General"));

    // Ugly hack, the mimetype should be a parameter, instead
    KoDocumentBase* doc = dynamic_cast< KoDocumentBase* >(d->info->parent());
    if (doc) {
        page->setIcon(KisIconUtils::loadIcon(KisMimeDatabase::iconNameForMimeType(doc->mimeType())));
    } else {
        // hide all entries not used in pages for KoDocumentInfoPropsPage
        d->aboutUi->filePathInfoLabel->setVisible(false);
        d->aboutUi->filePathLabel->setVisible(false);
        d->aboutUi->filePathSeparatorLine->setVisible(false);
        d->aboutUi->lblTypeDesc->setVisible(false);
        d->aboutUi->lblType->setVisible(false);
    }
    addPage(page);
    d->pages.append(page);

    initAboutTab();

    d->authorUi = new Ui::KoDocumentInfoAuthorWidget();
    QWidget *authordlg = new QWidget();
    d->authorUi->setupUi(authordlg);
    page = new KPageWidgetItem(authordlg, i18n("Author"));
    page->setHeader(i18n("Last saved by"));
    page->setIcon(koIcon("user-identity"));
    addPage(page);
    d->pages.append(page);

    initAuthorTab();
}
开发者ID:ChrisJong,项目名称:krita,代码行数:49,代码来源:KoDocumentInfoDlg.cpp


示例16: vector2d

	login::login()
	{
		app.getimgcache()->setmode(ict_login);

		node title = nl::nx::nodes["UI"]["Login.img"]["Title"];
		node common = nl::nx::nodes["UI"]["Login.img"]["Common"];

		sprites.push_back(sprite(animation(title["11"]), vector2d(410, 300)));
		sprites.push_back(sprite(animation(title["35"]), vector2d(410, 260)));
		sprites.push_back(sprite(animation(title["Logo"]), vector2d(410, 130)));
		sprites.push_back(sprite(animation(title["signboard"]), vector2d(410, 300)));
		sprites.push_back(sprite(animation(common["frame"]), vector2d(400, 290)));

		buttons[BT_LOGIN] = button(title["BtLogin"], 475, 248);
		buttons[BT_NEW] = button(title["BtNew"], 309, 320);
		buttons[BT_HOMEPAGE] = button(title["BtHomePage"], 382, 320);
		buttons[BT_PWDLOST] = button(title["BtPasswdLost"], 470, 300);
		buttons[BT_QUIT] = button(title["BtQuit"], 455, 320);
		buttons[BT_LOGINLOST] = button(title["BtLoginIDLost"], 395, 300);
		buttons[BT_SAVEID] = button(title["BtLoginIDSave"], 325, 300);

		string defaultacc = config.getdefaultacc();
		saveid = config.getsaveid();

		saveidcheck[false] = texture(title["check"]["0"]);
		saveidcheck[true] = texture(title["check"]["1"]);

		textfields[TXT_ACC] = textfield(TXT_ACC, DWF_14L, TXC_WHITE, defaultacc, vector2d(315, 249), 12);
		textfields[TXT_ACC].setbg(texture(title["ID"]), -5, 0);

		textfields[TXT_PASS] = textfield(TXT_PASS, DWF_14L, TXC_WHITE, "", vector2d(315, 275), 12);
		textfields[TXT_PASS].setbg(texture(title["PW"]), -5, 0);

		if (saveid)
		{
			textfields[TXT_PASS].setfocus(true);
			app.getui()->settextfield(&textfields[TXT_PASS]);
		}
		else
		{
			textfields[TXT_ACC].setfocus(true);
			app.getui()->settextfield(&textfields[TXT_ACC]);
		}

		app.getimgcache()->unlock();
		position = vector2d(0, 0);
		dimensions = vector2d(800, 600);
		active = true;
		dragged = false;
		buttoncd = 0;
	}
开发者ID:LankMasterFlex,项目名称:journey_client,代码行数:51,代码来源:login.cpp


示例17: main

int main(int argc, char *argv[]){
    //Inicializamos el framework
    Gtk::Main kit(argc, argv);

    Gtk::CheckButton button("Checkbox button");

    Gtk::Window window;
    window.set_default_size(400,400);
    window.add(button);
    window.show_all();

    //Iniciamos el loop de eventos
    Gtk::Main::run(window);
    return 0;
}
开发者ID:emariotti3,项目名称:taller,代码行数:15,代码来源:checkbox_gtk.cpp


示例18: setSize

void PicItem::updateVisibility()
{
	if (m_bExpanded)
		setSize( 0, 0, InnerWidth+(2*SidePadding), m_innerHeight+TopPadding+BottomPadding, true );
		
	else
		setSize( 0, 0, InnerWidth+(2*SidePadding), TopPadding, true );
	
	const PinItemList::iterator end = m_pinItemList.end();
	for ( PinItemList::iterator it = m_pinItemList.begin(); it != end; ++it )
		(*it)->setVisible(m_bExpanded);
	
	if ( Button * btn = button("settings") )
		btn->setVisible(m_bExpanded);
}
开发者ID:ktechlab,项目名称:ktechlab-0.3,代码行数:15,代码来源:picitem.cpp


示例19: setError

void QgsGrassNewMapset::checkLocation()
{
  setError( mLocationErrorLabel );
  button( QWizard::NextButton )->setEnabled( true );

  if ( mCreateLocationRadioButton->isChecked() )
  {
    QString location = mLocationLineEdit->text();

    if ( location.isEmpty() )
    {
      button( QWizard::NextButton )->setEnabled( false );
      setError( mLocationErrorLabel, tr( "Enter location name!" ) );
    }
    else
    {
      if ( QFile::exists( gisdbase() + "/" + location ) )
      {
        button( QWizard::NextButton )->setEnabled( false );
        setError( mLocationErrorLabel, tr( "The location exists!" ) );
      }
    }
  }
}
开发者ID:FrancisGauthier,项目名称:QGIS,代码行数:24,代码来源:qgsgrassnewmapset.cpp


示例20: switch

void ThemeCreationWizard::onCurrentIdChanged(int index)
{
    switch (index)
    {
        case 2:
            button(QWizard::NextButton)->setEnabled(ui->txtName->text() != "");
            break;
        case 4:
            button(QWizard::NextButton)->setEnabled(imagesLoaded & 1);
            break;
        case 5:
            button(QWizard::NextButton)->setEnabled(imagesLoaded & 2);
            break;
        case 6:
            button(QWizard::NextButton)->setEnabled(imagesLoaded & 4);
            break;
        case 7:
            button(QWizard::NextButton)->setEnabled(imagesLoaded & 8);
            break;
        case 8:
            ui->lblSavePath->setText( QtHelpers::DesktopLocation().replace("\\", "/") + "/" + ui->txtName->text());
            break;
    }
}
开发者ID:dilpil22,项目名称:Velocity,代码行数:24,代码来源:themecreationwizard.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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