Beispiel #1
0
VSCMainWindows::VSCMainWindows(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);

    QWidget *widget = new QWidget;
    setCentralWidget(widget);
    m_pToolBar = new VSCToolBar(this);
    //m_pEvent->hide();
    CreateActions();
    SetupMenuBar();
    SetupToolBar();
    CreateDockWindows();

    m_pMainArea = new QTabWidget(this);

    m_pMainArea->setTabsClosable(true);
    m_pMainArea->setMovable(true);
    m_pEventThread = VEventThread::CreateObject();
    m_pEventThread->start();
	
    VSCView *pView = new VSCView(m_pMainArea, *m_pMainArea);
    m_pMainArea->addTab(pView,QIcon(tr(":/view/resources/3x3.png")), tr("View"));
    connect(m_pEventThread, SIGNAL(EventNotify(int, int)), 
			pView, SLOT(DeviceEvent(int, int)));


    setCentralWidget(m_pMainArea);

    QString message = tr("VS Cloud Client");


    SetupConnections();
}
Beispiel #2
0
VSCMainWindows::VSCMainWindows(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
#if 0
    //TODO add a test device
    DeviceParam mParam(VSC_DEVICE_CAM, VSC_SUB_DEVICE_FILE, "dtneu_winter.mpg", "192.168.0.1");
    gFactory->AddDevice(mParam);
    DeviceParam mParam1(VSC_DEVICE_CAM, VSC_SUB_DEVICE_FILE, "AVSS_PV_Hard_Divx.avi", "192.168.0.2");
    gFactory->AddDevice(mParam1);
    DeviceParam mParam2(VSC_DEVICE_CAM, VSC_SUB_DEVICE_FILE, "test.mov", "TestFile");
    gFactory->AddDevice(mParam2);
#endif    

    QWidget *widget = new QWidget;
    setCentralWidget(widget);
    CreateActions();
    SetupMenuBar();
    SetupToolBar();
    CreateDockWindows();

    m_pMainArea = new QTabWidget(this);

    m_pMainArea->setTabsClosable(true);
    m_pMainArea->setMovable(true);

    VSCView *pView = new VSCView(m_pMainArea, *m_pMainArea);
    //VSCView *pView2 = new VSCView(this);
    m_pMainArea->addTab(pView,"VSCView");
    //m_pMainArea->addTab(pView2,"2x2 View");


    //pVideo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    //pVideo->setMinimumSize(pView->ui.widget->width(),
    //        pView->ui.widget->height());
#if 0
    QVBoxLayout* layout = new QVBoxLayout();
    VSCVideoWall * pVideo = new VSCVideoWall();

    //layout->setSpacing(10);

    layout->addWidget(pVideo);
    layout->setMargin(0);

    pView->ui.widget->setLayout(layout);
#endif
    setCentralWidget(m_pMainArea);

    QString message = tr("VS Cloud Client");
    statusBar()->showMessage(message);
    //pVideo->Start();
    SetupConnections();

}
Beispiel #3
0
VSCMainWindows::VSCMainWindows(ClientFactory &pFactory, QWidget *parent)
    : m_pFactory(pFactory), QMainWindow(parent), m_VidIdx(VSC_VID_IDX_LAST)
{

	ui.setupUi(this);
#ifdef WIN32
	setStyleSheet(QString::fromUtf8("font: 10pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
#endif
	m_pToolBar = new VSCToolBar(this);
	SetupToolBar();

	VSCLoading *loading = new VSCLoading(NULL);
	loading->show();
	QDesktopWidget *desktop = QApplication::desktop();
	QRect rect = desktop->screenGeometry(0);
	loading->setGeometry(rect.width()/2, rect.height()/2, 64, 64);
	QCoreApplication::processEvents();

	//QDockWidget *m_pDockDevicelist = new QDockWidget(tr("Devices"), this);
	m_pDockDevicelist = new QDockWidget(m_parent);
	m_pDockDevicelist->setFeatures(QDockWidget::DockWidgetMovable);

	//m_pDockDevicelist->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
	m_pDockDevicelist->setAllowedAreas(Qt::LeftDockWidgetArea);
	m_pDockDevicelist->setTitleBarWidget(new QWidget(m_parent));

	m_pVidList = new VSCVidList(m_pDockDevicelist);
	m_pDockDevicelist->setWidget(m_pVidList);
	

	/* Show the Live default */
	m_pVidLive = new VSCVidLive(m_pFactory, this);
	m_pVidConf = new VSCVidInf(m_pFactory, this);//TODO
	m_pVidPb = new VSCVidInf(m_pFactory, this);//TODO
	ShowVidLive();

	delete loading;

	setWindowTitle(QApplication::translate("VSCMainWindowsClass", VE_INFO, 0));

	connect(m_pToolBar->ui.pbFullScreen, SIGNAL(clicked()), this, SLOT(SetFullScreen()));
	connect(m_pToolBar->ui.pbAbout, SIGNAL(clicked()), this, SLOT(about()));
	connect(m_pToolBar->ui.pbUser, SIGNAL(clicked()), this, SLOT(UserStatus()));

	connect(m_pToolBar->ui.pbVidLive, SIGNAL(clicked()), this, SLOT(ShowVidLive()));
	connect(m_pToolBar->ui.pbVidLiveView, SIGNAL(clicked()), m_pVidLive, SLOT(SlotNewLiveView()));
	connect(m_pToolBar->ui.pbEmap, SIGNAL(clicked()), m_pVidLive, SLOT(SlotNewEmap()));

	connect(m_pToolBar->ui.pbVidPb, SIGNAL(clicked()), this, SLOT(ShowVidPb()));
	connect(m_pToolBar->ui.pbVidConf, SIGNAL(clicked()), this, SLOT(ShowVidConf()));

}
Beispiel #4
0
VSCMainWindows::VSCMainWindows(QWidget *parent)
    : m_pEMap(NULL), QMainWindow(parent)
{

    ui.setupUi(this);
#ifdef WIN32
	setStyleSheet(QString::fromUtf8("font: 10pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
#endif


    QWidget *widget = new QWidget;
    setCentralWidget(widget);
    m_pToolBar = new VSCToolBar(this);
    //m_pEvent->hide();
    CreateActions();
    SetupMenuBar();
    SetupToolBar();
    CreateDockWindows();

    m_pMainArea = new QTabWidget(this);

    m_pMainArea->setTabsClosable(true);
    m_pMainArea->setMovable(true);
    m_pEventThread = VEventThread::CreateObject();
    m_pEventThread->start();
	
	VSCLoading *loading = new VSCLoading(NULL);
	loading->show();
       QDesktopWidget *desktop = QApplication::desktop();
	QRect rect = desktop->screenGeometry(0);
	loading->setGeometry(rect.width()/2, rect.height()/2, 64, 64);
	QCoreApplication::processEvents();
#if 1	
	m_pView = new VSCView(m_pMainArea, *m_pMainArea, tr("Main View"));
	m_pView->setWindowFlags(Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint  );
	m_pMainArea->addTab(m_pView,QIcon(tr(":/view/resources/3x3.png")), tr("Main View"));
	connect(m_pEventThread, SIGNAL(EventNotify(int, int)), 
			m_pView, SLOT(DeviceEvent(int, int)));
#endif

    setCentralWidget(m_pMainArea);

    QString message = tr("VS Cloud Client");

	delete loading;
    SetupConnections();
	setWindowTitle(QApplication::translate("VSCMainWindowsClass", VE_INFO, 0));
}
Beispiel #5
0
frmDebugger::frmDebugger(frmMain *_parent, dbgController *_controller,
                         const wxString &_title) : pgFrame(_parent, _title), m_menuBar(NULL),
	m_toolBar(NULL), m_viewMenu(NULL), m_debugMenu(NULL), m_statusBar(NULL),
	m_parent(_parent), m_controller(_controller), m_stackWindow(NULL),
	m_tabWindow(NULL), m_codeViewer(NULL)
{
	dlgName = wxT("frmDebugger");
	RestorePosition(100, 100, 600, 500, 450, 300);

	SetFont(settings->GetSystemFont());

	m_manager.SetManagedWindow(this);
	m_manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_TRANSPARENT_DRAG);

	// Define the icon for this window
	SetIcon(*debugger_png_ico);

	// Create (and configure) the menu bar, toolbar, and status bar
	m_menuBar   = SetupMenuBar();
	m_toolBar   = SetupToolBar();
	m_statusBar = SetupStatusBar();

	m_manager.AddPane(
	    m_toolBar,
	    wxAuiPaneInfo().Name(wxT("toolBar")).Caption(wxT("Toolbar"))
	    .ToolbarPane().Top().Row(1).Position(1).LeftDockable(false)
	    .RightDockable(false));

	// Now load the layout
	wxString perspective;
	settings->Read(
	    wxT("Debugger/frmDebugger/Perspective-")
	    + wxString(FRMDEBUGGER_PERSPECTIVE_VER),
	    &perspective, FRMDEBUGGER_DEFAULT_PERSPECTIVE);

	m_manager.LoadPerspective(perspective, true);

	// and reset the captions for the current language
	m_manager.GetPane(wxT("toolBar")).Caption(_("Toolbar"));

	// Sync the View menu options
	m_viewMenu->Check(MENU_ID_VIEW_TOOLBAR, m_manager.GetPane(wxT("toolBar")).IsShown());

	SetupDebugger();

	m_manager.Update();
}
Beispiel #6
0
void wxMaximaFrame::ShowToolBar(bool show)
{
#if defined __WXMAC__
  wxToolBar *tbar = GetToolBar();
  tbar->Show(show);
#else
  if (show) {
    if (GetToolBar() == NULL)
      SetupToolBar();
  }
  else {
    wxToolBar *tbar = GetToolBar();
    if (tbar != NULL) {
      delete tbar;
      m_plotSlider = NULL;
      SetToolBar(NULL);
    }
  }
#endif
}
Beispiel #7
0
wxMaximaFrame::wxMaximaFrame(wxWindow* parent, int id, const wxString& title,
                             const wxPoint& pos, const wxSize& size,
                             long style):
    wxFrame(parent, id, title, pos, size, wxDEFAULT_FRAME_STYLE)
{
  m_manager.SetManagedWindow(this);
  // console
  m_console = new MathCtrl(this, -1, wxDefaultPosition, wxDefaultSize);

  // history
  m_history = new History(this, -1);

  m_plotSlider = NULL;

  SetupMenu();
#if defined (__WXMSW__) || defined (__WXGTK20__) || defined (__WXMAC__)
  SetupToolBar();
#endif


  CreateStatusBar(2);
  int widths[] =
    {
      -1, 300
    };
  SetStatusWidths(2, widths);

#if defined __WXMSW__
  wxAcceleratorEntry entries[0];
  entries[0].Set(wxACCEL_CTRL,  WXK_RETURN, menu_evaluate);
  wxAcceleratorTable accel(1, entries);
  SetAcceleratorTable(accel);
#endif

  set_properties();
  do_layout();

  m_console->SetFocus();
}
Beispiel #8
0
VSCMainWindows::VSCMainWindows(ClientFactory &pFactory, QWidget *parent)
    : m_pFactory(pFactory), QMainWindow(parent), m_VidIdx(VSC_VID_IDX_LAST), 
    m_pMainView(NULL), m_pDashBoard(NULL), m_pEventConsole(NULL)
{

	ui.setupUi(this);
#ifdef WIN32
	setStyleSheet(QString::fromUtf8("font: 10pt \"\345\276\256\350\275\257\351\233\205\351\273\221\";"));
#endif
	m_pToolBar = new VSCToolBar(this);
	SetupToolBar();

	VSCLoading *loading = new VSCLoading(NULL);
	loading->show();
	QDesktopWidget *desktop = QApplication::desktop();
	QRect rect = desktop->screenGeometry(0);
	loading->setGeometry(rect.width()/2, rect.height()/2, 64, 64);
	QCoreApplication::processEvents();

	//QDockWidget *m_pDockDevicelist = new QDockWidget(tr("Devices"), this);
	m_pDockDevicelist = new QDockWidget(this);
	m_pDockDevicelist->setFeatures(QDockWidget::DockWidgetMovable);

	m_pDockDevicelist->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
	//m_pDockDevicelist->setAllowedAreas(Qt::LeftDockWidgetArea);
	m_pDockDevicelist->setTitleBarWidget(new QWidget(this));

	m_pVidList = new VSCVidList(m_pDockDevicelist);
	m_pDockDevicelist->setWidget(m_pVidList);

	addDockWidget(Qt::LeftDockWidgetArea, m_pDockDevicelist);
	//addDockWidget(Qt::RightDockWidgetArea, m_pDockDevicelist);

	m_pMainArea = new QTabWidget(this);

	m_pMainArea->setTabsClosable(true);
	m_pMainArea->setMovable(true);

	setCentralWidget(m_pMainArea);
	connect(m_pMainArea, SIGNAL(tabCloseRequested(int)), this, SLOT(MainCloseTab(int)));
	

	/* Show the Live default */
	m_pVidLive = new VSCVidLive(m_pFactory, *m_pMainArea, this);
	m_pMainView = m_pVidLive->GetMainView();
	m_pVidConf = new VSCVidConf(m_pFactory, *m_pMainArea, this);
	m_pVidPb = new VSCVidSearchPB(m_pFactory, *m_pMainArea, this);

	/* First hide all */
	m_pToolBar->ui.pbVidEventSearch->hide();
	m_pToolBar->ui.pbVidMotionSearch->hide();
	m_pVidLive->VidHide();
	m_pVidConf->VidHide();
	m_pVidPb->VidHide();
	ShowVidLive();

	delete loading;

	setWindowTitle(QApplication::translate("VSCMainWindowsClass", VE_INFO, 0));

	connect(m_pToolBar->ui.pbFullScreen, SIGNAL(clicked()), this, SLOT(SetFullScreen()));
	//connect(m_pToolBar->ui.pbAbout, SIGNAL(clicked()), this, SLOT(ShowAbout()));
	connect(m_pToolBar->ui.pbAbout, SIGNAL(clicked()), this, SLOT(about()));
	connect(m_pToolBar->ui.pbUser, SIGNAL(clicked()), this, SLOT(UserStatus()));

	connect(m_pToolBar->ui.pbVidLive, SIGNAL(clicked()), this, SLOT(ShowVidLive()));
	connect(m_pToolBar->ui.pbVidLiveView, SIGNAL(clicked()), m_pVidLive, SLOT(SlotNewLiveView()));
	connect(m_pToolBar->ui.pbVidPb, SIGNAL(clicked()), m_pVidLive, SLOT(SlotNewLivePB()));

	connect(m_pToolBar->ui.pbVidSearch, SIGNAL(clicked()), this, SLOT(ShowVidPb()));

	connect(m_pToolBar->ui.pbVidEventSearch, SIGNAL(clicked()), m_pVidPb, 
													SLOT(SlotNewEventSearch()));
	connect(m_pToolBar->ui.pbVidMotionSearch, SIGNAL(clicked()), m_pVidPb, 
													SLOT(SlotNewMotionSearch()));
	connect(m_pToolBar->ui.pbVidPb, SIGNAL(clicked()), m_pVidLive, SLOT(SlotNewLivePB()));
	
	connect(m_pToolBar->ui.pbVidConf, SIGNAL(clicked()), this, SLOT(ShowVidConf()));
	connect(m_pToolBar->ui.pbVidDashBoard, SIGNAL(clicked()), this, SLOT(ShowDashBoard()));
	connect(m_pToolBar->ui.pbAlarm, SIGNAL(clicked()), this, SLOT(ShowEventConsole()));
	connect(&(m_pFactory.GetStorFactory()), SIGNAL(SignalEvent1()), 
			m_pToolBar, SLOT(NewAlarm()));

	m_pEventConsole = new VSCEventConsole(m_pFactory, this);
	m_pEventConsole->hide();
	

}