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


C++ Q3BoxLayout::addWidget方法代码示例

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


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

示例1: QDialog

AskText::AskText( QWidget *parent, const char *name, const char *caption,const char *prompt)
    : QDialog( parent, name ,TRUE)
{

  
  setCaption(caption);
  Q3BoxLayout *all =  new Q3VBoxLayout(this,20);  

  QLabel *label = new QLabel(prompt,this);
  all->addWidget(label);
  text = new QLineEdit(this);
  text->setMinimumWidth(120);
  connect( text, SIGNAL(returnPressed()), SLOT(accept()) );
  all->addWidget(text);

  Q3BoxLayout *bottom = new Q3HBoxLayout(all,40);
  QPushButton *ok = new QPushButton(this);
  ok->setText("OK");  
  connect( ok, SIGNAL(clicked()), SLOT(accept()) ); 
  bottom->addWidget(ok);
  QPushButton *cancel = new QPushButton(this);
  cancel->setText("Cancel");  
  connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); 
  bottom->addWidget(cancel);

}
开发者ID:saintfrater,项目名称:qt-agi-studio,代码行数:26,代码来源:wutil.cpp

示例2: QDialog

//************************************************
ReplaceWord::ReplaceWord(string word,int OldGroupNum, int NewGroupNum, QWidget *parent, QString name )
  : QDialog( parent, name, TRUE ,Qt::WDestructiveClose)
{

  setCaption("Replace word");

  Q3BoxLayout *all = new Q3VBoxLayout(this,10);
  sprintf(tmp,"The word %s already exists in group %d of the currently open file.",word.c_str(),OldGroupNum);
  QLabel *l1 = new QLabel(tmp,this);
  all->add(l1);

  sprintf(tmp,"Do you wish to replace it with the occurance in the merge file (group %d )?",NewGroupNum);
  QLabel *l2 = new QLabel(tmp,this);
  all->add(l2);
  
  Q3BoxLayout *b = new Q3HBoxLayout(all,10);

  QPushButton *yes = new QPushButton( "Yes", this );
  connect( yes, SIGNAL(clicked()), SLOT(yes() ));
  b->addWidget(yes);
  QPushButton *yes_to_all = new QPushButton( "Yes to all", this );
  connect( yes_to_all, SIGNAL(clicked()), SLOT(yes_to_all() ));
  b->addWidget(yes_to_all);
  QPushButton *no = new QPushButton( "No", this );
  connect( no, SIGNAL(clicked()), SLOT(no() ));
  b->addWidget(no);
  QPushButton *no_to_all = new QPushButton( "No to all", this );
  connect( no_to_all, SIGNAL(clicked()), SLOT(no_to_all() ));
  b->addWidget(no_to_all);

  adjustSize();

}
开发者ID:saintfrater,项目名称:qt-agi-studio,代码行数:34,代码来源:wordsedit.cpp

示例3: TAAWidget

RateCenterManager::RateCenterManager
(
	QWidget* parent,
	const char* name
) : TAAWidget(parent)
{
    setCaption( "Rate Center Manager" );

    rcList = new Q3ListView(this, "Rate Center Manager");
    rcList->setAllColumnsShowFocus(true);
    rcList->setRootIsDecorated(true);
    rcList->addColumn("Country/State/City");
    rcList->addColumn("Active");
    rcList->addColumn("Avail");
    rcList->addColumn("Total");
    connect(rcList, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(itemDoubleClicked(Q3ListViewItem *)));

    activeColumn    = 1;
    availColumn     = 2;
    totalColumn     = 3;
    idColumn        = 4;

    rcList->setColumnAlignment(activeColumn, Qt::AlignRight);
    rcList->setColumnAlignment(availColumn,  Qt::AlignRight);
    rcList->setColumnAlignment(totalColumn,  Qt::AlignRight);


    addButton = new QPushButton(this, "Add Button");
    addButton->setText("&Add");
    connect(addButton, SIGNAL(clicked()), this, SLOT(addClicked()));

    editButton = new QPushButton(this, "Edit Button");
    editButton->setText("&Edit");
    connect(editButton, SIGNAL(clicked()), this, SLOT(editClicked()));

    deleteButton = new QPushButton(this, "Delete Button");
    deleteButton->setText("&Delete");
    connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
    deleteButton->setEnabled(false);

    closeButton = new QPushButton(this, "Close Button");
    closeButton->setText("&Close");
    connect(closeButton, SIGNAL(clicked()), this, SLOT(closeClicked()));

    Q3BoxLayout  *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3);
    ml->addWidget(rcList, 1);

    
    Q3BoxLayout  *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 1);
    bl->addStretch(1);
    bl->addWidget(addButton, 0);
    bl->addWidget(editButton, 0);
    bl->addWidget(deleteButton, 0);
    bl->addWidget(closeButton, 0);

    ml->addLayout(bl, 0);

    refreshRateCenters();
}
开发者ID:gottafixthat,项目名称:tacc,代码行数:59,代码来源:RateCenterManager.cpp

示例4: QWidget

//********************************************************
WordsFind::WordsFind( QWidget *parent, const char *name , WordsEdit *w)
    : QWidget( parent, name )
{

  wordsedit = w;
  wordlist=w->wordlist;
  setCaption("Find");
  Q3BoxLayout *all =  new Q3VBoxLayout(this,10);  

  Q3BoxLayout *txt = new Q3HBoxLayout(all,4);

  QLabel *label = new QLabel("Find what:",this);  
  txt->addWidget(label);
  
  find_field = new QLineEdit(this);
  find_field->setMinimumWidth(200);
  connect( find_field, SIGNAL(returnPressed()), SLOT(find_first_cb()) );
  txt->addWidget(find_field);

  Q3BoxLayout *left1 =  new Q3HBoxLayout(all,10);

  Q3ButtonGroup *direction = new Q3ButtonGroup(2,Qt::Vertical,"Dir",this);
  up = new QRadioButton("Up",direction);
  up->setChecked(false);
  down = new QRadioButton("Down",direction);
  down->setChecked(true);
  left1->addWidget(direction);

  Q3ButtonGroup *from = new Q3ButtonGroup(2,Qt::Vertical,"From",this);
  start = new QRadioButton("Start",from);
  start->setChecked(true);
  current = new QRadioButton("Current",from);
  current->setChecked(false);
  left1->addWidget(from);

  Q3ButtonGroup *type = new Q3ButtonGroup(2,Qt::Vertical,"Match",this);
  exact = new QRadioButton("Exact",type);
  exact->setChecked(false);
  substring = new QRadioButton("Substr",type);
  substring->setChecked(true);
  left1->addWidget(type);

  Q3BoxLayout *right =  new Q3VBoxLayout(left1,5);  
  find_first = new QPushButton("Find",this);
  right->addWidget(find_first);
  connect( find_first, SIGNAL(clicked()), SLOT(find_first_cb()) );
  find_next = new QPushButton("Find next",this);
  connect( find_next, SIGNAL(clicked()), SLOT(find_next_cb()) );
  right->addWidget(find_next);
  cancel = new QPushButton("Cancel",this);
  connect( cancel, SIGNAL(clicked()), SLOT(cancel_cb()) );
  right->addWidget(cancel);

  adjustSize();

  FindLastWord=-1;
  FindLastGroup=-1;
  
}
开发者ID:saintfrater,项目名称:qt-agi-studio,代码行数:60,代码来源:wordsedit.cpp

示例5: ViewWidget

HCircleView::HCircleView( int viewID_, QWidget *parent )
 : ViewWidget( viewID_, parent)
{
  setCaption("Harmonic Circle");

Q3BoxLayout *mainLayout = new Q3HBoxLayout(this);

  Q3BoxLayout *leftLayout = new Q3VBoxLayout(mainLayout);
  Q3BoxLayout *rightLayout = new Q3VBoxLayout(mainLayout);
 
  Q3Grid *waveFrame = new Q3Grid(1, this);
  waveFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
  leftLayout->addWidget(waveFrame);

  hCircleWidget = new HCircleWidget(waveFrame);

  Q3BoxLayout *bottomLayout = new Q3HBoxLayout(leftLayout);
 
  QwtWheel* ZoomWheel = new QwtWheel(this);
  ZoomWheel->setOrientation(Qt::Vertical);
  ZoomWheel->setWheelWidth(14);
  ZoomWheel->setRange(0.001, 0.1, 0.001, 1);
  ZoomWheel->setValue(0.007);
  hCircleWidget->setZoom(0.007);
  QToolTip::add(ZoomWheel, "Zoom in or out");
  rightLayout->addWidget(ZoomWheel);
  
  QwtWheel* lowestValueWheel = new QwtWheel(this);
  lowestValueWheel->setOrientation(Qt::Vertical);
  lowestValueWheel->setWheelWidth(14);
  lowestValueWheel->setRange(-160, 10, 0.01, 1);
  lowestValueWheel->setValue(-100);
  hCircleWidget->setLowestValue(-100);
  QToolTip::add(lowestValueWheel, "Change the lowest value");
  rightLayout->addWidget(lowestValueWheel);
  rightLayout->addStretch(2);
 
  QwtWheel* thresholdWheel = new QwtWheel(this);
  thresholdWheel->setOrientation(Qt::Horizontal);
  thresholdWheel->setWheelWidth(14);
  thresholdWheel->setRange(-160, 10, 0.01, 1);
  thresholdWheel->setValue(-100);
  hCircleWidget->setThreshold(-100);
  QToolTip::add(thresholdWheel, "Change the harmonic threshold");
  bottomLayout->addWidget(thresholdWheel);
  bottomLayout->addStretch(2);

  connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setZoom(double)));
  connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

  connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setLowestValue(double)));
  connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

  connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setThreshold(double)));
  connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

}
开发者ID:Guildenstern,项目名称:Tartini,代码行数:57,代码来源:hcircleview.cpp

示例6: QTabBar

TE_Main::TE_Main(QWidget* parent, const char* name) :
	TAAWidget(parent)
{
	setCaption( "Targeted Email" );

    // Create our widgets.
    theTabBar = new QTabBar(this);

    // Create the tabs for the tab bar.
    theTabBar->addTab("Message");
    theTabBar->addTab("Login Types");
    theTabBar->addTab("Cities");

    qws = new Q3WidgetStack(this, "widgetStack");
    
    // Create the actual tabs now, using the widget stack as the parent.
    tmessage = new TE_Message(qws);
    qws->addWidget(tmessage, 0);
    
    tlogins = new TE_LoginTypes(qws);
    qws->addWidget(tlogins, 1);
    
    tcities = new TE_Cities(qws);
    qws->addWidget(tcities, 2);

    // Buttons now.
    QPushButton *sendButton = new QPushButton(this, "sendButton");
    sendButton->setText("&Send");
    connect(sendButton, SIGNAL(clicked()), this, SLOT(sendMessage()));

    QPushButton *cancelButton = new QPushButton(this, "cancelButton");
    cancelButton->setText("&Cancel");
    connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancelClicked()));

    // Create our layout.
    Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3);
    ml->addWidget(theTabBar, 0);
    ml->addWidget(qws, 1);

    Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3);
    bl->addStretch(1);
    bl->addWidget(sendButton, 0);
    bl->addWidget(cancelButton, 0);

    ml->addLayout(bl, 0);
    
    connect(theTabBar, SIGNAL(selected(int)), qws, SLOT(raiseWidget(int)));

    // Create our Ctrl-1 through Ctrl-3 hotkeys
    Q3Accel  *ac = new Q3Accel(this);
    ac->insertItem(Qt::CTRL+Qt::Key_1, 0);
    ac->insertItem(Qt::CTRL+Qt::Key_2, 1);
    ac->insertItem(Qt::CTRL+Qt::Key_3, 2);
    connect(ac, SIGNAL(activated(int)), this, SLOT(raiseTab(int)));
}
开发者ID:gottafixthat,项目名称:tacc,代码行数:55,代码来源:TE_Main.cpp

示例7: TAAWidget

BillingCycles::BillingCycles
(
	QWidget* parent,
	const char* name
) : TAAWidget(parent)
{
    // Create our widgets.
    list = new Q3ListView(this, "Cycle List");
    list->addColumn("Cycle ID");
    list->addColumn("Type");
    list->addColumn("Description");
    list->setAllColumnsShowFocus(true);

    // Create our buttons.
    QPushButton *newButton = new QPushButton(this, "New");
    newButton->setText("&New");
    connect(newButton, SIGNAL(clicked()), this, SLOT(newCycle()));

    QPushButton *editButton = new QPushButton(this, "Edit");
    editButton->setText("&Edit");
    connect(editButton, SIGNAL(clicked()), this, SLOT(editCycle()));

    QPushButton *deleteButton = new QPushButton(this, "Delete");
    deleteButton->setText("&Delete");
    connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteCycle()));

    QPushButton *closeButton = new QPushButton(this, "Close");
    closeButton->setText("&Close");
    connect(closeButton, SIGNAL(clicked()), this, SLOT(closeClicked()));

    // Our layout.  Very simple.
    Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3);
    ml->addWidget(list, 1);

    // Buttons.
    Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 1);
    bl->addStretch(1);
    bl->addWidget(newButton, 0);
    bl->addWidget(editButton, 0);
    bl->addWidget(deleteButton, 0);
    bl->addWidget(closeButton, 0);

    ml->addLayout(bl, 0);


    // Create our layout.


	setCaption( "Billing Cycles" );

}
开发者ID:gottafixthat,项目名称:tacc,代码行数:51,代码来源:BillingCycles.cpp

示例8: create

void QtCameraSettingsWidget::create(void)
{	
	//our camera mode buttons
	Q3ButtonGroup* camera_modegrp = new Q3ButtonGroup( 2, Qt::Horizontal, "Camera Mode:", this );
	camera_modegrp->setExclusive(true);
	connect(camera_modegrp, SIGNAL( clicked (int) ), this, SLOT( camerasettings_mode_slot(int) ) );

		camera_ortho_pb = new QPushButton("Orthogonal\nCamera", camera_modegrp);
		camera_ortho_pb->setToggleButton(TRUE);
		camera_ortho_pb->setOn(TRUE);
		camera_ortho_pb->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum, false));
		//connect( camera_ortho_pb, SIGNAL( clicked () ), this, SLOT( stereo_onoff_event() ) );

		camera_persp_pb = new QPushButton("Perspective\nCamera", camera_modegrp);
		camera_persp_pb->setToggleButton(TRUE);
		camera_persp_pb->setOn(FALSE);
		camera_persp_pb->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum, false));
		///connect( camera_persp_pb, SIGNAL( clicked () ), this, SLOT( stereo_onoff_event() ) );

	perpectivesettings_grp = new Q3ButtonGroup( 2, Qt::Vertical, "Perspective Camera:", this );
	perpectivesettings_grp->setDisabled(true);

			Q3ButtonGroup* cameraFOV_grp = new Q3ButtonGroup( 1, Qt::Horizontal, "", perpectivesettings_grp );
			camerafov_lb = new QLabel( "Field of View: 45", cameraFOV_grp );
			camerafov = 45;
			camerafov_slider = new QSlider ( 1, 180, 5, 45, Qt::Horizontal, cameraFOV_grp, "numbsliceslod_slider" );
			camerafov_slider->setTickmarks( QSlider::Below );
			camerafov_slider->setTracking(FALSE);
			camerafov_slider->setTickInterval(32);
			connect(camerafov_slider, SIGNAL(valueChanged(int)), this, SLOT(camerasettings_fov_slot(int)) );
			camerasettings_fov_slot(camerafov);


			Q3ButtonGroup* camerastep_grp = new Q3ButtonGroup( 1, Qt::Horizontal, "", perpectivesettings_grp );
			camerastep_lb = new QLabel( "Camera Step Size: 5", camerastep_grp );
			camerastep = 5;
			camerastep_slider = new QSlider ( 1, 100, 5, 5, Qt::Horizontal, camerastep_grp, "numbsliceslod_slider" );
			camerastep_slider->setTickmarks( QSlider::Below );
			camerastep_slider->setTracking(FALSE);
			camerastep_slider->setTickInterval(10);
			connect(camerastep_slider, SIGNAL(valueChanged(int)), this, SLOT(camerasettings_step_slot(int)) );
			camerasettings_step_slot(camerastep);


	Q3BoxLayout *vboxlayoutRIGHT = new Q3BoxLayout ( 0, Q3BoxLayout::TopToBottom, 0, 5, "vboxlayout");
	vboxlayoutRIGHT->addWidget(camera_modegrp, 0, Qt::AlignTop);
	vboxlayoutRIGHT->addWidget(perpectivesettings_grp, 0, Qt::AlignTop);
	
	Q3BoxLayout *topmost= new Q3BoxLayout ( this, Q3BoxLayout::LeftToRight, 10, 5, "topmost");
	topmost->addLayout(vboxlayoutRIGHT, 10);
}
开发者ID:ut666,项目名称:VolViewer,代码行数:51,代码来源:QtCameraSettingsWidget.cpp

示例9: QDialog

SelectionList::SelectionList
(
	QWidget* parent,
	const char* name
) : QDialog ( parent, name )
{
	setCaption( "Select an Item" );

    titleLabel = new QLabel(this, "Title Label");
    titleLabel->setText("Please select an option.");
    titleLabel->setAlignment(Qt::AlignTop|Qt::AlignHCenter);

    list = new Q3ListView(this, "Selection List");
    list->setAllColumnsShowFocus(true);

    extraLabel = new QLabel(this, "Extra Label");
    extraLabel->setText("");
    extraLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);

    extraList = new QComboBox(false, this, "Extra List");

    acceptButton = new QPushButton(this, "Accept Button");
    acceptButton->setText("&Accept");
    connect(acceptButton, SIGNAL(clicked()), SLOT(accept()));
    
    cancelButton = new QPushButton(this, "Cancel Button");
    cancelButton->setText("&Cancel");
    connect(cancelButton, SIGNAL(clicked()), SLOT(reject()));


    // Create the layout for this box.  _Very_ simple.  Top down box
    // with a button box at the bottom.
    
    Q3BoxLayout  *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3);
    ml->addWidget(titleLabel, 0);
    ml->addWidget(list, 1);
    
    Q3BoxLayout *bl = new Q3BoxLayout(Q3BoxLayout::LeftToRight, 3);
    bl->addWidget(extraLabel, 0);
    bl->addWidget(extraList, 1);
    bl->addSpacing(10);
    bl->addWidget(acceptButton, 0);
    bl->addWidget(cancelButton, 0);

    ml->addLayout(bl, 0);

    extraLabel->hide();
    extraList->hide();
	
}
开发者ID:gottafixthat,项目名称:tacc,代码行数:50,代码来源:SelectionList.cpp

示例10: set_logedit

//***********************************************
void Options::set_logedit()
{

  QWidget *logedit = new QWidget(this);

  Q3BoxLayout *all = new Q3VBoxLayout(logedit,10);
  messages = new QCheckBox("Show all messages at end (not just unused ones)",logedit);
  all->addWidget(messages);
  elses = new QCheckBox("Show all elses as gotos",logedit);
  all->addWidget(elses);
  special = new QCheckBox("Show special syntax (e.g. v30=4)",logedit);
  all->addWidget(special);
  addTab(logedit,"Logic editor");

}
开发者ID:saintfrater,项目名称:qt-agi-studio,代码行数:16,代码来源:options.cpp

示例11: TAAWidget

UserPrivs::UserPrivs
(
	QWidget* parent,
	const char* name
) : TAAWidget(parent)
{
    setCaption("User Administration");

    // Create our widgets
    userList = new Q3ListView(this);
    userList->addColumn("User Name");
    userList->addColumn("Access");
    userList->setGeometry(5,5,150,250);
    userList->setMinimumSize(150,0);
    userList->setMaximumSize(150,32767);
    userList->setAllColumnsShowFocus(true);
    connect(userList, SIGNAL(currentChanged(Q3ListViewItem *)), this, SLOT(userSelected(Q3ListViewItem *)));
    connect(userList, SIGNAL(doubleClicked(Q3ListViewItem *)), this, SLOT(userSelected(Q3ListViewItem *)));

    editArea = new UserEditor(this);

    // Create our layout.
    Q3BoxLayout *mainLayout = new Q3BoxLayout(this, Q3BoxLayout::LeftToRight, 2, 2);
    mainLayout->addWidget(userList, 0);
    mainLayout->addWidget(editArea, 1);

    //setGeometry(5,5,575,300);
    
    myCurrentID = 0;

    refreshList();

    connect(editArea, SIGNAL(userUpdated(long)), this, SLOT(userUpdated(long)));
}
开发者ID:gottafixthat,项目名称:tacc,代码行数:34,代码来源:UserPrivs.cpp

示例12: QDialog

ModuleDialog::ModuleDialog(PinEditDoc * doc, QWidget * parent, const char * name, Qt::WFlags f) 
: QDialog(parent, name, f) {
	EM_CERR("ModuleDialog::ModuleDialog");
	assert(doc != NULL);
	p_Doc = doc;
	p_FakeModuleBehavior = NULL;

	p_EditModule = new QLineEdit(this);
	QPushButton * choosebutton = new QPushButton("choose", this);
	connect(choosebutton, SIGNAL(clicked()), this, SLOT(slotChooseModule()));

	QPushButton * donebutton = new QPushButton("done", this);
	connect(donebutton, SIGNAL(clicked()), this, SLOT(slotDone()));

	Q3BoxLayout * hlayout = new Q3HBoxLayout(this);
	hlayout->addWidget(p_EditModule);
	hlayout->addWidget(choosebutton);
	hlayout->addWidget(donebutton);
}
开发者ID:sergiomb2,项目名称:pinball-pinedit,代码行数:19,代码来源:moduledialog.cpp

示例13: openmovieplayer_event

void QtDatasetViewWidget::openmovieplayer_event(void)
{
	QDialog* movie_dialogue = new QDialog(this, "Movie Player", 0);
	movie_dialogue->setModal(false);

	movieplayer = new QtMoviePlayer(0, &dsview.datathumbnails);

	Q3BoxLayout * boxlayout = new Q3BoxLayout ( movie_dialogue, Q3BoxLayout::TopToBottom, 0, 5, "rigth_blayout");
    boxlayout->addWidget( movieplayer, 10);

	movie_dialogue->resize(512,512);
	movie_dialogue->show();
}
开发者ID:ut666,项目名称:VolViewer,代码行数:13,代码来源:QtDatasetViewWidget.cpp

示例14: set_general

//***********************************************
void Options::set_general()
{

  QWidget *general = new QWidget(this);  
  Q3BoxLayout *all = new Q3VBoxLayout(general,10);

  Q3GroupBox *b1 = new Q3GroupBox(2,Horizontal,"",general);

  QLabel *l = new QLabel("Default resource type",b1);
  l->setText("Default resource type");  //to avoid compilation warning
  
  type = new QComboBox(false,b1,"type");
  type->insertItem( "LOGIC" );
  type->insertItem( "PICTURE" );
  type->insertItem( "VIEW" );
  type->insertItem( "SOUND" );

  QLabel *l2 = new QLabel("Picedit style",b1);
  l2->setText("Picedit style");  //to avoid compilation warning

  picstyle = new QComboBox(false,b1,"picstyle");
  picstyle->insertItem( "One window" );
  picstyle->insertItem( "Two windows" );

  all->addWidget(b1);

  Q3ButtonGroup *extract = new Q3ButtonGroup(2,Horizontal,"Extract logic as",general);
  extract->setMaximumSize(200,100);
  extract->setExclusive(true);
  text = new QRadioButton("Text",extract);
  binary = new QRadioButton("Binary",extract);

  all->addWidget(extract);


  addTab(general,"General");

}
开发者ID:saintfrater,项目名称:qt-agi-studio,代码行数:39,代码来源:options.cpp

示例15: QCheckBox

TE_Cities::TE_Cities(QWidget* parent, const char* name) :
	TAAWidget(parent)
{
    allCitiesButton = new QCheckBox("Send to customers in all cities", this, "allCitiesButton");
    connect(allCitiesButton, SIGNAL(clicked()), this, SLOT(allCitiesClicked()));

    cityList = new Q3ListView(this, "cityList");
    cityList->addColumn("City");
    cityList->addColumn("State");
    cityList->setAllColumnsShowFocus(TRUE);
    cityList->setMultiSelection(TRUE);
    
    // Basic layout, box top to bottom.
    Q3BoxLayout *ml = new Q3BoxLayout(this, Q3BoxLayout::TopToBottom, 3, 3);
    ml->addWidget(allCitiesButton, 0);
    ml->addWidget(cityList, 1);


    loadCities();
    
    
    allCitiesButton->setChecked(TRUE);
    allCitiesClicked();
}
开发者ID:gottafixthat,项目名称:tacc,代码行数:24,代码来源:TE_Cities.cpp


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