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


C++ QCheckBox::toggle方法代码示例

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


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

示例1: on_equipment_twCharacterClassList_cellClicked

void Database_Items::on_equipment_twCharacterClassList_cellClicked(int row)
{
	QCheckBox *checkBox = (QCheckBox*)equipment_twCharacterClassList->cellWidget(row, 0);
	checkBox->toggle();
}
开发者ID:timdetering,项目名称:openrpgmaker,代码行数:5,代码来源:database_items.cpp

示例2: QPushButton

DrFinestra::DrFinestra(QWidget *parent,const char *name)
  :QWidget(parent,name){
    //         esci
  QPushButton *esci = new QPushButton("&Esci",this,"Esci");
  esci->setFont( QFont("Times",18,QFont::Bold) );
  connect(esci, SIGNAL(clicked()), qApp,SLOT(quit()) );
  e1 = new ElementiGrafici(this);
  //           disegna linee
  QCheckBox *linee = new QCheckBox("&Linee",this,"linee");
  linee->toggle();
  connect(linee,SIGNAL(clicked() ),e1,SLOT(DisegnaLinee()) );
  //           disegna punti
  QCheckBox *punti = new QCheckBox("&Punti",this,"punti");
  connect(punti,SIGNAL(clicked() ),e1,SLOT(DisegnaPunti()) );
  //          distr
  QPushButton *distr = new QPushButton("&Distr",this,"distr");
  connect(distr, SIGNAL(clicked() ), e1,SLOT(PuntiDistribuzione()) );
  //          Valori
  QSpinBox *Valori = new QSpinBox(2,1000,20,this,"Valori");
  connect(Valori,SIGNAL(valueChanged(int)),e1,SLOT(ImpValori(int)) );
  connect(e1,SIGNAL(ValoriCambiati(int)),Valori,SLOT(setValue(int)) );
  //           disegna griglia
  QCheckBox *griglia = new QCheckBox("&Griglia",this,"griglia");
  connect(griglia,SIGNAL(clicked() ),e1,SLOT(DisegnaGriglia()) );
  //           seRiscala
  QCheckBox *riscala = new QCheckBox("&Ris",this,"riscala");
  connect(riscala,SIGNAL(clicked() ),e1,SLOT(SeRiscala()) );
  //           seRisTutto
  QCheckBox *risTutto = new QCheckBox("&Tutti",this,"risTutto");
  connect(risTutto,SIGNAL(clicked() ),e1,SLOT(SeRiscalaTutto()) );
  //           seSet
  QCheckBox *nset = new QCheckBox("&Set",this,"nset");
  connect(nset,SIGNAL(clicked() ),e1,SLOT(NSet()) );
  //           salva
  QPushButton *salva = new QPushButton("&Salva",this,"autocor");
  connect(salva, SIGNAL(clicked() ), e1,SLOT(Salva()) );
  //         Animazione
  a1 = new Animation(this);
  connect(a1, SIGNAL(PuntaCoord(double **,int,int,int) ), e1,SLOT(ApriExt(double**,int,int,int)) );
  //connect(a1, SIGNAL( PuntaCoord(Variabili *v1) ), e1,SLOT(ApriExt(Variabili *v1)) );
//         image
  QPushButton *image = new QPushButton("&Image",this,"image");
  connect(image, SIGNAL(clicked() ), a1,SLOT(Open()) );
  //         punta
  QPushButton *punta = new QPushButton("&Punta",this,"Punta");
  connect(punta, SIGNAL(clicked() ), a1,SLOT(Punta()) );
  //         nomeFile
  QLineEdit *nomeFile = new QLineEdit(this,"nomeFile");
  connect(nomeFile,SIGNAL( textChanged(const QString &)),a1,SLOT( NomeFile(const QString &)) );
  //          filter
  QPushButton *filter = new QPushButton("&Filter",this,"filter");
  connect(filter, SIGNAL(clicked() ), a1,SLOT(Filter()) );
  //          motion
  QPushButton *motion = new QPushButton("&Motion",this,"motion");
  connect(motion, SIGNAL(clicked() ), a1,SLOT(Motion()) );
  //          run
  QPushButton *run = new QPushButton("&run",this,"run");
  connect(run, SIGNAL(clicked() ), a1,SLOT(Run()) );
  //          filterMC
  QPushButton *filterMC = new QPushButton("&MC",this,"MC");
  connect(filterMC, SIGNAL(clicked() ), a1,SLOT(FilterMC()) );
  //          filterCoarseGrain
  QPushButton *filterCoarseGrain = new QPushButton("&CG",this,"CG");
  connect(filterCoarseGrain, SIGNAL(clicked() ), a1,SLOT(FilterCoarseGrain()) );
  connect(filterCoarseGrain, SIGNAL(clicked() ), e1,SLOT(repaint()) );
  //          NGrana
  QSpinBox *NGrana = new QSpinBox(0,5,1,this,"NGrana");
  connect(NGrana,SIGNAL(valueChanged(int)),a1,SLOT(ImpGrana(int)) );
  //          filterIncrease
  QPushButton *filterIncrease = new QPushButton("&Increase",this,"Increase");
  connect(filterIncrease, SIGNAL(clicked() ), a1,SLOT(FilterIncrease()) );
  //          filterContrast
  QPushButton *filterContrast = new QPushButton("&Contrast",this,"Contrast");
  connect(filterContrast, SIGNAL(clicked() ), a1,SLOT(FilterContrast()) );
  connect(filterContrast, SIGNAL(clicked() ), e1,SLOT(repaint()) );
  //          BW
  QPushButton *blackwhite = new QPushButton("&B/W",this,"B/W");
  connect(blackwhite, SIGNAL(clicked() ), a1,SLOT(BlackWhite()) );
  connect(blackwhite, SIGNAL(clicked() ), e1,SLOT(repaint()) );
  //          binary
  QPushButton *binary = new QPushButton("&0/1",this,"0/1");
  connect(binary, SIGNAL(clicked() ), a1,SLOT(Binary()) );
  connect(binary, SIGNAL(clicked() ), e1,SLOT(repaint()) );
  //    Histo
  QPushButton *histo = new QPushButton("&Histo",this,"Histo");
  connect(histo, SIGNAL(clicked() ), a1,SLOT(Histo()) );
  //    NablaPhi
  QPushButton *nablaphi = new QPushButton("&Phi",this,"Phi");
  connect(nablaphi, SIGNAL(clicked() ), a1,SLOT(NablaPhi()) );
  connect(nablaphi, SIGNAL(clicked() ), e1,SLOT(repaint()) );
  //        Script
  s1 = new DrScript();
  //    >
  QPushButton *forward = new QPushButton("&>",this,">");
  connect(forward, SIGNAL(clicked() ), a1,SLOT(IncrSlide()) );
  connect(forward, SIGNAL(clicked() ), s1,SLOT(IncrSlide()) );
  //      Scena
  QGridLayout *grid= new QGridLayout(this,1,3,10);
  //grid->addWidget(a1,1,1);
  grid->setColStretch(1,15);
//.........这里部分代码省略.........
开发者ID:sabeiro,项目名称:Allink,代码行数:101,代码来源:DrFinestra.cpp

示例3: on_skillScroll_twCharacterClassList_cellClicked

void Database_Items::on_skillScroll_twCharacterClassList_cellClicked(int row)
{
	QCheckBox *checkBox = (QCheckBox*)skillScroll_twCharacterClassList->cellWidget(row, 0);
	checkBox->toggle();
}
开发者ID:timdetering,项目名称:openrpgmaker,代码行数:5,代码来源:database_items.cpp

示例4: QDialog

SaveSelectionDialog::SaveSelectionDialog(int channelCount, QString currentDirectory, QWidget *parent) : QDialog(parent), _currentDirectory(currentDirectory)
{
	assert(channelCount > 0);

	setWindowTitle(tr("Selektion Speichern"));

	// Create main layouts
	QGridLayout *mainLayout = new QGridLayout(this);
	setLayout(mainLayout);

	// Create file selection
	QLabel *filenameLabel = new QLabel(tr("Dateiname:"), this);
	mainLayout->addWidget(filenameLabel, 0, 0, 1, 1);

	_filenameEdit = new QLineEdit(this);
	//_filenameEdit->setReadOnly(true);
	mainLayout->addWidget(_filenameEdit, 0, 1, 1, 2);

	QPushButton *selectFilenameButton = new QPushButton(tr("..."), this);
	selectFilenameButton->setMaximumWidth(30);
	mainLayout->addWidget(selectFilenameButton, 0, 3, 1, 1);
	connect(selectFilenameButton, SIGNAL(clicked()), this, SLOT(FilenameRequested()));

	// Create channel selection
	QGroupBox *channelGroup = new QGroupBox(tr("Farbkanäle"), this);
	mainLayout->addWidget(channelGroup, 1, 0, 1, 2);

	QVBoxLayout *vboxchannels = new QVBoxLayout;
	for (int i = 0; i < channelCount; i++)
	{
		QCheckBox *checkbox = new QCheckBox(tr("Kanal %1").arg(i+1));
		checkbox->toggle();
		_channelCheckBoxes.append(checkbox);
		vboxchannels->addWidget(checkbox);
	}
	vboxchannels->addStretch(1);
	channelGroup->setLayout(vboxchannels);

	// Create color depth selection
	QGroupBox *colordepthGroup = new QGroupBox(tr("Farbtiefe / Kanal"), this);
	mainLayout->addWidget(colordepthGroup, 1, 2, 1, 2);

	_8bitButton = new QRadioButton(tr("8 Bit Integer"));
	_16bitButton = new QRadioButton(tr("16 Bit Integer"));
	_floatButton = new QRadioButton(tr("32 Bit Float"));

	QVBoxLayout *vboxcolor = new QVBoxLayout;
	vboxcolor->addWidget(_8bitButton);
	vboxcolor->addWidget(_16bitButton);
	vboxcolor->addWidget(_floatButton);
	vboxcolor->addStretch(1);
	colordepthGroup->setLayout(vboxcolor);

	_8bitButton->toggle();

	// Create apply option checkboxes
	_separatechannelsCheckBox = new QCheckBox(tr("Farbkanäle separieren"), this);
	mainLayout->addWidget(_separatechannelsCheckBox, 2, 0, 1, 4);

	_applycbCheckBox = new QCheckBox(tr("Kontrast / Helligkeit anwenden"), this);
	_applycbCheckBox->toggle();
	mainLayout->addWidget(_applycbCheckBox, 3, 0, 1, 4);

	// Create buttons
	QPushButton *acceptButton = new QPushButton(tr("&OK"), this);
	mainLayout->addWidget(acceptButton, 4, 0, 1, 2);
	connect(acceptButton, SIGNAL(clicked()), this, SLOT(accept()));

	QPushButton *cancelButton = new QPushButton(tr("&Abbrechen"), this);
	mainLayout->addWidget(cancelButton, 4, 2, 1, 2);
	connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

	acceptButton->setDefault(true);
}
开发者ID:BackupTheBerlios,项目名称:geoaida-svn,代码行数:74,代码来源:SaveSelectionDialog.cpp


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