void OpenIGTLinkProviderExample::CreateQtPartControl( QWidget *parent )
{
  // create GUI widgets from the Qt Designer's .ui file
  m_Controls.setupUi( parent );

  // connect the widget items with the methods
  connect( m_Controls.butStart, SIGNAL(clicked()),
           this, SLOT(Start()) );
  connect( m_Controls.butOpenNavData, SIGNAL(clicked()),
           this, SLOT(OnOpenFile()) );
  connect( &m_VisualizerTimer, SIGNAL(timeout()),
           this, SLOT(UpdateVisualization()));


  //create a new OpenIGTLink Client
  m_IGTLServer = mitk::IGTLServer::New();
  m_IGTLServer->SetName("OIGTL Provider Example Device");

  //create a new OpenIGTLink Device source
  m_IGTLMessageProvider = mitk::IGTLMessageProvider::New();

  //set the OpenIGTLink server as the source for the device source
  m_IGTLMessageProvider->SetIGTLDevice(m_IGTLServer);

  //register the provider so that it can be configured with the IGTL manager
  //plugin. This could be hardcoded but now I already have the fancy plugin.
  m_IGTLMessageProvider->RegisterAsMicroservice();
}
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->actionOpen_PVR, SIGNAL(triggered()), this, SLOT(OnOpenFile()));
    connect(ui->actionExit, SIGNAL(triggered()), this, SLOT(close()));
    connect(ui->convertButton, SIGNAL(clicked()), this, SLOT(OnConvertButtonClicked()));

    BuildTwiddleTable();
}
Example #3
0
LDFViewer::LDFViewer(QWidget* parent, QString strFileName)
    : QMainWindow(parent)
{
    vSetupFileMenu();
    vSetupEditor();
    m_pouLdfEditor->setReadOnly(true);
    setCentralWidget(m_pouLdfEditor);
    m_pouLdfEditor->setWordWrapMode(QTextOption::WrapMode::NoWrap);
    setWindowTitle("BUSMASTER LDF Viewer");
    if ( strFileName.isEmpty() == false )
    {
        OnOpenFile(strFileName);
    }
}
Example #4
0
void LDFViewer::vSetupFileMenu()
{
    QMenu* pouFileMenu = new QMenu(tr("&File"), this);
    menuBar()->addMenu(pouFileMenu);

    pouFileMenu->addAction(tr("&Open..."), this, SLOT(OnOpenFile()), QKeySequence::Open);
    pouFileMenu->addSeparator();
    pouFileMenu->addAction(tr("E&xit"), qApp, SLOT(quit()), QKeySequence::Quit);

    /*QMenu *pouHelpMenu = new QMenu(tr("&Help"), this);
    menuBar()->addMenu(pouHelpMenu);

    pouHelpMenu->addAction(tr("&About..."), this, SLOT(OnOpenFile()));*/
}
void QmitkNavigationDataPlayerView::CreateConnections()
{
  connect( m_Controls->m_RdbSequential, SIGNAL(released()), this, SLOT(OnSelectPlayer()) );
  connect( m_Controls->m_RdbTimeBased, SIGNAL(released()), this, SLOT(OnSelectPlayer()) );
  connect( m_Controls->m_BtnOpenFile, SIGNAL(released()), this, SLOT(OnOpenFile()) );
  connect( m_Controls->m_ChkDisplay, SIGNAL(released()), this, SLOT(OnSetDisplay()) );
  connect( m_Controls->m_chkRepeat, SIGNAL(stateChanged(int)), this, SLOT(OnSetRepeat(int)) );
  connect( m_Controls->m_ChkMicroservice, SIGNAL(released()), this, SLOT(OnSetMicroservice()) );

  connect( m_Controls->m_SequentialWidget, SIGNAL(SignalUpdate()), this, SLOT(OnUpdate()) );
  connect( m_Controls->m_TimedWidget, SIGNAL(SignalUpdate()), this, SLOT(OnUpdate()) );

  this->SetInteractionComponentsEnabledState(false);
}
Example #6
0
BOOL CALLBACK SetupDlgFunc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {

	switch (uMsg) {
	case WM_INITDIALOG:
		return InitDialog(hWnd);

	case WM_NOTIFY:
		OnNotify(hWnd, wParam, lParam);
		break;

	case WM_COMMAND:
		switch (LOWORD(wParam))	{
		case IDOK:
			OnOK(hWnd);
			EndDialog(hWnd, IDOK);
			break;

		case IDCANCEL:
			EndDialog(hWnd, IDCANCEL);
			break;
		
		case IDC_ADD:		// アイテムの追加
			OnEdit(hWnd, TRUE);
			break;

		case IDC_MODIFY:	// アイテムの変更
			OnEdit(hWnd, FALSE);
			break;
		
		case IDC_DELETE:	// アイテムの削除
			OnDelete(hWnd);
			break;
		
		case IDC_OPENFILE:	// ファイルの参照
			OnOpenFile(hWnd);
			break;
		}
	}
	return FALSE;
}
Example #7
0
void clTreeCtrlPanel::OnItemActivated(wxTreeEvent& event)
{
    event.Skip();
    wxCommandEvent dummy;
    OnOpenFile(dummy);
}
Example #8
0
void OnFileSystemCommand(
                        SerializerContext* cmdContext,
                        SerializerContext* respContext,
                        unsigned char* responseBuffer,
                        unsigned short responseBufferSize)
{
  nmc.cmdContext = cmdContext;
  nmc.respContext = respContext;
  nmc.responseBuffer = responseBuffer;
  nmc.responseBufferSize = responseBufferSize;

  unsigned char fsCmd = 0;
  Get(cmdContext, (void*)&fsCmd, sizeof(fsCmd));
  switch(fsCmd){
  case Mount:
    OnMount(&nmc);
    break;
  case UnMount:
    OnUnMount(&nmc);
    break;
  case OpenFile:
    OnOpenFile(&nmc);
    break;
  case CloseFile:
    OnCloseFile(&nmc);
    break;
  case ReadFile:
    OnReadFile(&nmc);
    break;
  case WriteFile:
    OnWriteFile(&nmc);
    break;
  case SeekFile:
    OnSeekFile(&nmc);
    break;
  case TruncateFile:
    OnTruncateFile(&nmc);
    break;
  case SyncFile:
    OnSyncFile(&nmc);
    break;
  case ReadString:
    OnReadString(&nmc);
    break;
  case WriteString:
    OnWriteString(&nmc);
    break;
  case GetFilePosition:
    OnGetFilePosition(&nmc);
    break;
  case GetEndOfFile:
    OnGetEndOfFile(&nmc);
    break;
  case GetFileSize:
    OnGetFileSize(&nmc);
    break;
  case GetFileError:
    OnGetFileError(&nmc);
    break;
  case OpenDir:
    OnOpenDir(&nmc);
    break;
  case CloseDir:
    OnCloseDir(&nmc);
    break;
  case ReadDir:
    OnReadDir(&nmc);
    break;
  case MakeDir:
    OnMakeDir(&nmc);
    break;
  case ChangeDir:
    OnChangeDir(&nmc);
    break;
  case GetCurrentDir:
    OnGetCurrentDir(&nmc);
    break;
  case GetFreeSpace:
    OnGetFreeSpace(&nmc);
    break;
  case Unlink:
    OnUnlink(&nmc);
    break;
  case ChangeAttribute:
    OnChangeAttribute(&nmc);
    break;
  case ChangeTime:
    OnChangeTime(&nmc);
    break;
  case Rename:
    OnRename(&nmc);
    break;
  case GetDiskStatus:
    OnGetDiskStatus(&nmc);
    break;
  default:
    vt100TextColor(VT100_Red, VT100_Black);
    printf("%s: invalid command: %i\r\n", __func__, (int)fsCmd);
    vt100TextDefault();
    break;
  }
}