示例#1
0
//! [5]
void ControllerWindow::createTypeGroupBox()
{
    typeGroupBox = new QGroupBox(tr("Type"));

    windowRadioButton = createRadioButton(tr("Window"));
    dialogRadioButton = createRadioButton(tr("Dialog"));
    sheetRadioButton = createRadioButton(tr("Sheet"));
    drawerRadioButton = createRadioButton(tr("Drawer"));
    popupRadioButton = createRadioButton(tr("Popup"));
    toolRadioButton = createRadioButton(tr("Tool"));
    toolTipRadioButton = createRadioButton(tr("Tooltip"));
    splashScreenRadioButton = createRadioButton(tr("Splash screen"));
    windowRadioButton->setChecked(true);

    QGridLayout *layout = new QGridLayout;
    layout->addWidget(windowRadioButton, 0, 0);
    layout->addWidget(dialogRadioButton, 1, 0);
    layout->addWidget(sheetRadioButton, 2, 0);
    layout->addWidget(drawerRadioButton, 3, 0);
    layout->addWidget(popupRadioButton, 0, 1);
    layout->addWidget(toolRadioButton, 1, 1);
    layout->addWidget(toolTipRadioButton, 2, 1);
    layout->addWidget(splashScreenRadioButton, 3, 1);
    typeGroupBox->setLayout(layout);
}
示例#2
0
void ControllerWindow::createTypeGroupBox()
{
    widgetTypeGroupBox = new QGroupBox(tr("Widget Type"));
    previewWidgetButton = createRadioButton(tr("QWidget"));
    previewWidgetButton->setChecked(true);
    previewDialogButton = createRadioButton(tr("QDialog"));
    QHBoxLayout *l = new QHBoxLayout;
    l->addWidget(previewWidgetButton);
    l->addWidget(previewDialogButton);
    widgetTypeGroupBox->setLayout(l);

    additionalOptionsGroupBox = new QGroupBox(tr("Additional options"));
    l = new QHBoxLayout;
    modalWindowCheckBox = createCheckBox(tr("Modal window"));
    fixedSizeWindowCheckBox = createCheckBox(tr("Fixed size window"));
    l->addWidget(modalWindowCheckBox);
    l->addWidget(fixedSizeWindowCheckBox);
    additionalOptionsGroupBox->setLayout(l);

    typeGroupBox = new QGroupBox(tr("Type"));

    windowRadioButton = createRadioButton(tr("Window"));
    dialogRadioButton = createRadioButton(tr("Dialog"));
    sheetRadioButton = createRadioButton(tr("Sheet"));
    drawerRadioButton = createRadioButton(tr("Drawer"));
    popupRadioButton = createRadioButton(tr("Popup"));
    toolRadioButton = createRadioButton(tr("Tool"));
    toolTipRadioButton = createRadioButton(tr("Tooltip"));
    splashScreenRadioButton = createRadioButton(tr("Splash screen"));
    windowRadioButton->setChecked(true);

    QGridLayout *layout = new QGridLayout;
    layout->addWidget(windowRadioButton, 0, 0);
    layout->addWidget(dialogRadioButton, 1, 0);
    layout->addWidget(sheetRadioButton, 2, 0);
    layout->addWidget(drawerRadioButton, 3, 0);
    layout->addWidget(popupRadioButton, 0, 1);
    layout->addWidget(toolRadioButton, 1, 1);
    layout->addWidget(toolTipRadioButton, 2, 1);
    layout->addWidget(splashScreenRadioButton, 3, 1);
    typeGroupBox->setLayout(layout);
}
示例#3
0
void BetControler::onEnter()
{
	Layer::onEnter();
	//initWithColor(ccc4(200,10,20,60));
	setContentSize(CCSizeMake(LAYER_WIDTH,LAYER_HEIGHT));
	LayoutUtil::layoutParentCenter(this,280,-240);

	m_foldButton=createSelectButton("fold.png","fold_down.png");
	LayoutUtil::layoutParentLeftBottom(m_foldButton);
	m_foldButton->setUserData((void*)(Player::DECISION_FOLD));
	m_ptrFoldTimer = CCProgressTimer::create(ResourceManager::getInstance()->createSprite(this, "fold_timer.png"));
	m_ptrFoldTimer->setType(kCCProgressTimerTypeRadial);
	m_ptrFoldTimer->setReverseProgress(true);
	m_ptrFoldTimer->setPercentage(0);
	m_foldButton->addChild(m_ptrFoldTimer);
	LayoutUtil::layoutParentCenter(m_ptrFoldTimer);

	m_checkButton=createSelectButton("check.png","check_down.png");
	LayoutUtil::layoutParentLeftBottom(m_checkButton,160);
	m_checkButton->setUserData((void*)(Player::DECISION_CHECK));
	m_ptrCheckTimer = CCProgressTimer::create(ResourceManager::getInstance()->createSprite(this, "check_timer.png"));
	m_ptrCheckTimer->setType(kCCProgressTimerTypeRadial);
	m_ptrCheckTimer->setReverseProgress(true);
	m_ptrCheckTimer->setPercentage(0);
	m_checkButton->addChild(m_ptrCheckTimer);
	LayoutUtil::layoutParentCenter(m_ptrCheckTimer);

	m_callButton=createSelectButton("call.png","call_down.png");
	LayoutUtil::layoutParentLeftBottom(m_callButton,160);
	m_callButton->setUserData((void*)(Player::DECISION_CALL));
	m_ptrLbCallAmount = CCLabelTTF::create("",FontConstant::TTF_IMPACT,20);
	m_callButton->addChild(m_ptrLbCallAmount);
	LayoutUtil::layoutParentCenter(m_ptrLbCallAmount);

	m_allinButton=createSelectButton("allin.png","allin_down.png");
	LayoutUtil::layoutParentLeftBottom(m_allinButton,160);
	m_allinButton->setUserData((void*)(Player::DECISION_ALLIN));

	m_raiseButton=createSelectButton("raise.png","raise_down.png","raise_disabled.png");
	LayoutUtil::layoutParentLeftBottom(m_raiseButton,320);
	m_raiseButton->setUserData((void*)(Player::DECISION_RAISE));
	
	m_okButton=createSelectButton("ok.png","ok_down.png");
	m_okButton->setUserData((void*)(Player::DECISION_CONFIRM));
	LayoutUtil::layoutParentLeftBottom(m_okButton,322);
	//-------------------------------
	
	m_checkFoldRadioButton=createRadioButton("label_checkfold.png","radio_checkfold.png","radio_checkfold_down.png");
	LayoutUtil::layoutParentLeftBottom(m_checkFoldRadioButton);
	m_checkFoldRadioButton->setUserData((void*)(Player::DECISION_CHECK_FOLD));

	m_checkRadioButton=createRadioButton("label_check.png","radio_check.png","radio_check_down.png");
	LayoutUtil::layoutParentLeftBottom(m_checkRadioButton,160);
	m_checkRadioButton->setUserData((void*)(Player::DECISION_CHECK));

	m_callRadioButton=createRadioButton("label_call.png","radio_call.png","radio_call_down.png");
	LayoutUtil::layoutParentLeftBottom(m_callRadioButton,160);
	m_callRadioButton->setUserData((void*)(Player::DECISION_CALL));

	m_allinRadioButton=createRadioButton("label_allin.png","radio_allin.png","radio_allin_down.png");
	LayoutUtil::layoutParentLeftBottom(m_allinRadioButton,160);
	m_allinRadioButton->setUserData((void*)(Player::DECISION_ALLIN));

	m_callanyRadioButton=createRadioButton("label_callany.png","radio_callany.png","radio_callany_down.png",
		"radio_callany_disabled.png","label_callany_disabled.png");
	LayoutUtil::layoutParentLeftBottom(m_callanyRadioButton,285);
	m_callanyRadioButton->setUserData((void*)(Player::DECISION_CALL_ANY));

	createSliderControler();
}
示例#4
0
SearchFind::SearchFind(OpenGLScene *scene,  QString target, int type)
{ //type 1: search, type 2: setting 
	
	delete this->layout();
	this->_layout = new QGridLayout();
	this->setLayout( this->_layout );
	_scene=scene;
		
	if(type==2)
	{
		this->_path = new QLineEdit( this );
		this->_path->setMaximumWidth(100);
		this->_layout->addWidget( _path, 0, 0, 1, 3 );			
		this->_go = new QPushButton( "Search", this );	
		
		this->_layout->addWidget( _go, 0, 2 );		
		connect( _go, SIGNAL(clicked()), this, SLOT(search()) );
		/*connect(&m_eQuery, SIGNAL(finished(bool,QString,QString))  
            ,this, SLOT(onQueryFinished(bool,QString,QString))); 

		connect( _go, SIGNAL(clicked()), 
            this, SLOT(onQueryButton()));  */

		msWindowsFixedSizeDialogCheckBox = createCheckBox(tr("small Molecule"));//draw/search protein
	    //x11BypassWindowManagerCheckBox = createCheckBox(tr("Complex"));  //draw/search complex/physical entity
		//windowNoShadowCheckBox = createCheckBox(tr("smallMoleculer"));  //draw/search complex/physical entity
		//framelessWindowCheckBox = createCheckBox(tr("Small Molecule"));
		//msWindowsFixedSizeDialogCheckBox->setChecked(false);
		//SearchList.insert('P');
         SearchList.insert('C');	SearchList.insert('P'); SearchList.insert('D'); SearchList.insert('S'); SearchList.insert('E');  SearchList.insert('R');	SearchList.insert('M');				 
		//_layout->addWidget(msWindowsFixedSizeDialogCheckBox, 2, 1);

		/* QComboBox *comboBox = new QComboBox;
    comboBox->addItem(tr("item 1"));
    comboBox->addItem(tr("item 2"));
    comboBox->addItem(tr("item 3"));
 
    QComboBox *iconComboBox = new QComboBox;
    iconComboBox->addItem(QIcon(":/images/bad.svg"), tr("Bad"));
    iconComboBox->addItem(QIcon(":/images/heart.svg"), tr("Heart"));
    iconComboBox->addItem(QIcon(":/images/trash.svg"), tr("Trash"));

		
	_layout->addWidget(iconComboBox);*/

	QListWidget* listBox = new QListWidget;
	//background: #eeeeee; border: 1px solid #afafaf;border-radius: 10px;margin: 10px 0 0 20px;max-width: 305px;min-height: 100px;} QListWidget::item{ background-image: url(:/pictures/attach_icon.png);background-repeat: no-repeat;background-position: left center; color: #212121;border: 1px solid #afafaf;min-height: 54px;max-height: 54px;padding-left: 54px;}QListWidget::item:selected{background-image: url(:/pictures/attach_icon.png);background-repeat: no-repeat;background-position: left center;background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #cdcdcd, stop: 1 #ababab);border-top: 1px solid;border-top-color: #a8abad;border-bottom: 1px solid;border-bottom-color: #bfc7ce;color: #333538;}");
	//listBox->setStyleSheet("QListWidget{ border: 1px solid #afafaf; border-radius: 10px}");
	
	
	listBox->addItem(tr("item 1"));
    listBox->addItem(tr("item 2"));
    listBox->addItem(tr("item 3")); 
    
	
	//_layout->addWidget(listBox);

		//_layout->addWidget(x11BypassWindowManagerCheckBox, 3, 1);
		//_layout->addWidget(windowNoShadowCheckBox, 4, 1);
		//x11BypassWindowManagerCheckBox->setChecked(true);
	}
	else if(type==3)
	{
		//Display small molecule
		QGridLayout *layout = new QGridLayout;	
		hintsGroupBox = new QGroupBox(tr("Display Objects"));	
		hintsGroupBox->setLayout(layout);		
		this->_layout->addWidget(hintsGroupBox,0,0,13,8);

	    layout->setAlignment(Qt::AlignTop);
		framelessWindowCheckBox = createCheckBox(tr("Small Molecule"));
		//framelessWindowCheckBox->setVisible(false);		
		layout->addWidget(framelessWindowCheckBox, 1, 0);
		if(_scene->drawSmallmoleculeSettings)
		{
			framelessWindowCheckBox->setChecked(true);			
		}	
		
		setNewRadioButton = createRadioButton(tr("apply only to new groups"));		
		layout->addWidget(setNewRadioButton, 2, 0);

		setAllRadioButton = createRadioButton(tr("apply to all groups"));
		layout->addWidget(setAllRadioButton, 3, 0);
		
		setNewRadioButton->setChecked(true);

		layout->setSpacing(2);

		/*
		//Setting about rescale mode			
		WindowDragResize= new QGroupBox(tr("Drag_To_Resize"));				 //rag_To_Resize
		WindowDragResize->setLayout(layout);
		this->_layout->addWidget(WindowDragResize,3,0);	

		dragResizeMode1 = createRadioButton(tr("Uniform scale")); //Word file mode // InterNet explorer mode		
		layout->addWidget(dragResizeMode1, 8, 0);

		dragResizeMode2 = createRadioButton(tr("Word file style")); //Word file mode // InterNet explorer mode		
		layout->addWidget(dragResizeMode2, 15, 0);

		dragResizeMode3 = createRadioButton(tr("Explorer syle"));  //Word file mode // InterNet explorer mode		
		layout->addWidget(dragResizeMode3, 16, 0);
		//if(_scene->resizeMode)
		{
			dragResizeMode2->setChecked(true);			
		}
		*/

		//Size of the bubbles
		//fixed size 
		//top level pathway
		//rest
		//Setting about rescale mode			
		/*
		initBubbleSize = new QGroupBox(tr("Bubble Size"));				 //rag_To_Resize
		initBubbleSize->setLayout(layout);
		this->_layout->addWidget(initBubbleSize,6,0);	

		fixedSizeCheckBox = createCheckBox(tr("Fixed initial size"));
		layout->addWidget(fixedSizeCheckBox, 18, 0);
		//if(_scene->drawSmallmoleculeSettings)
		{
			fixedSizeCheckBox->setChecked(true);			
		}	
		topSizeInput = new QLineEdit( this );
		_layout->addWidget( topSizeInput, 20,0 );

		sonSizeInput = new QLineEdit( this ); //Word file mode // InterNet explorer mode		
		layout->addWidget(sonSizeInput, 22, 0);

		ApplyButton = new QPushButton( "Apply", this );
		this->_layout->addWidget( ApplyButton, 24, 0 );		
		//connect( ApplyButton, SIGNAL(clicked()), this, SLOT(search()) );
		*/
	}		
	else if(type==4)
	{
		//Display small molecule
		QGridLayout *layout = new QGridLayout;	
		hintsGroupBox = new QGroupBox(tr("Search Objects"));	
		hintsGroupBox->setLayout(layout);

		layout->setSpacing(0);
		layout->setMargin(0);

		QButtonGroup *bg1 = new QButtonGroup(this);
		QButtonGroup *bg2 = new QButtonGroup(this);
		
		_layout->addWidget(hintsGroupBox,0,0,5,1);
		
		layout->setAlignment(Qt::AlignTop);
		proteinRadioButton = createRadioButton(tr("Protein"));
		layout->addWidget(proteinRadioButton, 1, 0);
		
		compartmentRadioButton = createRadioButton(tr("Compartment"));
		layout->addWidget(compartmentRadioButton, 2, 0);

		pathwayRadioButton = createRadioButton(tr("Pathway"));
		layout->addWidget(pathwayRadioButton, 3, 0);	


		bg1->addButton(proteinRadioButton);
		bg1->addButton(compartmentRadioButton);
		bg1->addButton(pathwayRadioButton);

		if(_scene->searchType == 'P')
		{
			proteinRadioButton->setChecked(true);			
		}	
		else if(_scene->searchType == 'M')
		{
			compartmentRadioButton->setChecked(true);			
		}
		else if(_scene->searchType == 'W')
		{
			pathwayRadioButton->setChecked(true);			
		}		
		setNewRadioButton = createRadioButton(tr("apply only to new groups"));		
		layout->addWidget(setNewRadioButton, 4, 0);

		setAllRadioButton = createRadioButton(tr("apply to all groups"));
		layout->addWidget(setAllRadioButton, 5, 0);	

		bg2->addButton(setNewRadioButton);
		bg2->addButton(setAllRadioButton);

		setNewRadioButton->setChecked(true);
	}	
	else if(type==5)
	{   //search setting 2
		//
		//Display small molecule
		QGridLayout *layout = new QGridLayout;	
		hintsGroupBox = new QGroupBox(tr("Search Relations"));	
		hintsGroupBox->setLayout(layout);		
		this->_layout->addWidget(hintsGroupBox,0,0,13,8);

	    layout->setAlignment(Qt::AlignTop);
		
		sharedCheckBox = createCheckBox(tr("shared"));
		layout->addWidget(sharedCheckBox, 1, 0);

		differedCheckBox = createCheckBox(tr("differed"));
		layout->addWidget(differedCheckBox, 1, 0);

		linkedCheckBox = createCheckBox(tr("linked"));
		layout->addWidget(linkedCheckBox, 1, 0);

		expressedCheckBox = createCheckBox(tr("expressed"));
		layout->addWidget(expressedCheckBox, 1, 0);
		
		if(_scene->searchShared)
		{
			sharedCheckBox->setChecked(true);			
		}
		if(_scene->searchDiffered)
		{
			differedCheckBox->setChecked(true);			
		}
		if(_scene->searchLinked)
		{
			linkedCheckBox->setChecked(true);			
		}
		if(_scene->searchExpressed)
		{
			expressedCheckBox->setChecked(true);			
		}
				
		setNewRadioButton = createRadioButton(tr("apply only to new groups"));		
		layout->addWidget(setNewRadioButton, 2, 0);

		setAllRadioButton = createRadioButton(tr("apply to all groups"));
		layout->addWidget(setAllRadioButton, 3, 0);
		
		setNewRadioButton->setChecked(true);

		layout->setSpacing(2);
	}	
	/*if(type==6)
	{
		this->_path = new QLineEdit( this );
		this->_path->setMaximumWidth(100);
		this->_layout->addWidget( _path, 0, 0, 1, 3 );			
		this->_go = new QPushButton( "Search", this );		
		this->_layout->addWidget( _go, 0, 2 );		
		connect( _go, SIGNAL(clicked()), this, SLOT(search()) );

		msWindowsFixedSizeDialogCheckBox = createCheckBox(tr("small Molecule"));//draw/search protein
	    //x11BypassWindowManagerCheckBox = createCheckBox(tr("Complex"));  //draw/search complex/physical entity
		//windowNoShadowCheckBox = createCheckBox(tr("smallMoleculer"));  //draw/search complex/physical entity
		//framelessWindowCheckBox = createCheckBox(tr("Small Molecule"));
		//msWindowsFixedSizeDialogCheckBox->setChecked(false);
		//SearchList.insert('P');
         SearchList.insert('C');	SearchList.insert('P'); SearchList.insert('D');  SearchList.insert('E');  SearchList.insert('R');	SearchList.insert('M');		
		//_layout->addWidget(msWindowsFixedSizeDialogCheckBox, 2, 1);

		
		//_layout->addWidget(x11BypassWindowManagerCheckBox, 3, 1);
		//_layout->addWidget(windowNoShadowCheckBox, 4, 1);
		//x11BypassWindowManagerCheckBox->setChecked(true);
	}*/
}