void QmitkSimulationPreferencePage::CreateQtControl(QWidget* parent)
{
  m_Control = new QWidget(parent);
  m_Controls.setupUi(m_Control);

  QStringList headerLabels;
  headerLabels << "Name" << "License" << "Version" << "Path";
  m_Controls.pluginsTreeWidget->setHeaderLabels(headerLabels);

  connect(m_Controls.pluginsTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(OnPluginTreeWidgetItemSelectionChanged()));
  connect(m_Controls.addButton, SIGNAL(clicked()), this, SLOT(OnAddButtonClicked()));
  connect(m_Controls.removeButton, SIGNAL(clicked()), this, SLOT(OnRemoveButtonClicked()));

  this->Update();
}
Esempio n. 2
0
MsgResult WebAddressDlg::Message( Msg* Message)
{
	BOOL fEndDialog=FALSE;

	//If the message is a dialog message
	if (IS_OUR_DIALOG_MSG(Message))
	{
		//Then work out what it says
		DialogMsg* pDialogMsg = ((DialogMsg*) Message); 
	
		switch (pDialogMsg->DlgMsg)
		{
			case DIM_CREATE:
				OnCreate();
				break;

			case DIM_COMMIT:
				OnAddButtonClicked();					
				break;
			
			case DIM_CANCEL:	
				fEndDialog = TRUE;
				break;

			case DIM_TEXT_CHANGED:
				//This ensures that, when this code changes some text
				//in an edit field, we don't handle the "text changed" message
				if (WebAddressDlg::DontHandleNextTextMessage)
				{
					WebAddressDlg::DontHandleNextTextMessage=FALSE;
				}
				else
					OnDialogChange();

				break;
				
			case DIM_LFT_BN_CLICKED:
				switch(pDialogMsg->GadgetID)
				{
				case _R(IDC_WEBADDRESS_REMOVE):
					OnRemoveButtonClicked();
					break;

				case _R(IDC_WEBADDRESS_OBJECTSHAPE):
				case _R(IDC_WEBADDRESS_RECTANGLE):
					OnDialogChange();
					break;

				case _R(IDC_WEBADDRESS_CORRECT):
					OnAutoCorrectClicked();
					break;
				}
				break;

			
				//NB: This means someone has altered the combo box. It doesn't mean
				//the selection has changed!
			case DIM_SELECTION_CHANGED: 
				OnDialogChange();
				break;
		}
	}
	else if (MESSAGE_IS_A(Message, SelChangingMsg))
	{
		if ( ((SelChangingMsg*)Message)->State == SelChangingMsg::SELECTIONCHANGED )
			OnSelectionChange();
	}
		
	if (fEndDialog) 
	{	
		Close(); 		   
		End();
	}


	return DialogOp::Message(Message);
} 
Esempio n. 3
0
void CSelectDialog::OnFieldListDblClk() {
	OnAddButtonClicked();
}