//-----------------------------------------------------------------------------
QmitkCmdLineModuleProgressWidget::QmitkCmdLineModuleProgressWidget(QWidget *parent)
  : QWidget(parent)
, m_ModuleManager(NULL)
, m_DataStorage(NULL)
, m_TemporaryDirectoryName("")
, m_UI(new Ui::QmitkCmdLineModuleProgressWidget)
, m_Layout(NULL)
, m_ModuleFrontEnd(NULL)
, m_FutureWatcher(NULL)
{
  m_UI->setupUi(this);
  m_UI->m_RemoveButton->setIcon(QApplication::style()->standardIcon(QStyle::SP_TitleBarCloseButton));

  m_Layout = new QVBoxLayout();
  m_Layout->setContentsMargins(0,0,0,0);
  m_Layout->setSpacing(0);
  m_UI->m_ParametersGroupBox->setLayout(m_Layout);

  qRegisterMetaType<mitk::DataNode::Pointer>();
  qRegisterMetaType<ctkCmdLineModuleReference>();

  connect(m_UI->m_RemoveButton, SIGNAL(clicked()), this, SLOT(OnRemoveButtonClicked()));

  // Due to Qt bug 12152, we cannot listen to the "paused" signal because it is
  // not emitted directly when the QFuture is paused. Instead, it is emitted after
  // resuming the future, after the "resume" signal has been emitted... we use
  // a polling approach instead.
  connect(&m_PollPauseTimer, SIGNAL(timeout()), SLOT(OnCheckModulePaused()));
  m_PollPauseTimer.setInterval(300);
  m_PollPauseTimer.start();
}
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();
}
예제 #3
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);
} 
예제 #4
0
void CSelectDialog::OnChosenListDblClk() {
	OnRemoveButtonClicked();
}