Ejemplo n.º 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();
}
Ejemplo n.º 2
0
QmitkPointListWidget::QmitkPointListWidget(QWidget *parent, int orientation)
  : QWidget(parent),
    m_PointListView(nullptr),
    m_PointSetNode(nullptr),
    m_Orientation(0),
    m_MovePointUpBtn(nullptr),
    m_MovePointDownBtn(nullptr),
    m_RemovePointBtn(nullptr),
    m_SavePointsBtn(nullptr),
    m_LoadPointsBtn(nullptr),
    m_ToggleAddPoint(nullptr),
    m_AddPoint(nullptr),
    m_TimeStepDisplay(nullptr),
    m_DataInteractor(nullptr),
    m_TimeStep(0),
    m_EditAllowed(true),
    m_NodeObserverTag(0)
{
  m_PointListView = new QmitkPointListView();

  if (orientation != 0)
    m_Orientation = orientation;

  SetupUi();
  SetupConnections();
  ObserveNewNode(nullptr);
}
Ejemplo n.º 3
0
VSCPlayback::VSCPlayback(QWidget *parent, QTabWidget &pTabbed)
    : QWidget(parent), m_pTabbed(pTabbed), m_currentFocus(-1)
{
    ui.setupUi(this);

    QVBoxLayout* layout = new QVBoxLayout();
    m_pVideo = new VSCVideoWall(this->ui.widget);
    m_pVideo->hide();
    //layout->setSpacing(10);

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

    this->ui.widget->setLayout(layout);

    m_pVideo->show();

    m_pFloating = new QAction(QIcon(tr("images/open.ico")), tr("Floating"), this);
    //m_pUnFloating = new QAction(QIcon(tr("images/open.ico")), tr("UnFloating"), this);
    //connect(m_pFloating, SIGNAL(triggered()), this, SLOT(floatingAction()));
    //connect(m_pUnFloating, SIGNAL(triggered()), this, SLOT(unFloatingAction()));
    SetupConnections();
    createContentMenu();

    m_pPlayControl = new VSCPlayControl();
    m_bPlayControl = FALSE;
    m_pPlayControl->hide();
    //setMouseTracking(true);
}
Ejemplo n.º 4
0
void VSCDeviceTree::createActions()
{
    pActAddCamera = new QAction(tr("&New"), this);
    pActAddCamera->setIcon(QIcon(":/action/resources/new.png"));
    pActEditCamera = new QAction(tr("&Edit"), this);
    pActEditCamera->setIcon(QIcon(":/action/resources/edit.png"));
    pActDeleteCamera = new QAction(tr("&Delete"), this);
    pActDeleteCamera->setIcon(QIcon(":/action/resources/user-trash-2.png"));
    pActRecord= new QAction(tr("&Start Recording"), this);
    pActRecord->setIcon(QIcon(":/action/resources/recordstart.png"));
    pActStopRecord = new QAction(tr("&Stop Recording"), this);
    pActStopRecord->setIcon(QIcon(":/action/resources/recordstop.png"));

    pActDiskEdit = new QAction(tr("&Edit"), this);
    pActDiskEdit->setIcon(QIcon(":/action/resources/edit.png"));

    /* Site */
    pActEditSite = new QAction(tr("&Edit"), this);
    pActEditSite->setIcon(QIcon(":/action/resources/edit.png"));

    pActAddSite = new QAction(tr("&New"), this);
    pActAddSite->setIcon(QIcon(":/action/resources/new.png"));

    pActRefreshSite = new QAction(tr("&Refresh"), this);
    pActRefreshSite->setIcon(QIcon(":/action/resources/refresh.png"));
    pActDelSite = new QAction(tr("&Delete"), this);
    pActDelSite->setIcon(QIcon(":/action/resources/user-trash-2.png"));
	

    SetupConnections();
    pPopMenu = new QMenu(this);
    //pPopMenu->addAction(pActAddCamera);
    //pPopMenu->addAction(pActEditCamera);
    //pPopMenu->addAction(pActDeleteCamera);
}
Ejemplo n.º 5
0
	IWebWidget* Core::GetWidget ()
	{
		if (!Initialized_)
			return 0;

		BrowserWidget *widget = new BrowserWidget ();
		widget->Deown ();
		widget->InitShortcuts ();
		SetupConnections (widget);
		return widget;
	}
Ejemplo n.º 6
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();

}
Ejemplo n.º 7
0
VSCCameraAdd::VSCCameraAdd(DeviceParam &Param, QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
	m_Param = Param;

	BOOL bHWAccel;
	BOOL bMining;

	m_nId = m_Param.m_Conf.data.conf.nId;
	if (m_nId == 0)
	{
		gFactory->GetDefaultHWAccel(bHWAccel);
		if (bHWAccel == TRUE)
		{
			VDC_DEBUG( "%s  Enable default the HWAccel\n",__FUNCTION__);
			m_Param.m_Conf.data.conf.HWAccel = 1;
		}

		gFactory->GetDefaultMining(bMining);
		if (bMining == TRUE)
		{
			VDC_DEBUG( "%s  Enable default the Mining\n",__FUNCTION__);
			m_Param.m_Conf.data.conf.Mining = 1;
		}
	}
	
#if 0
    m_pFloating = new QAction(QIcon(tr("images/open.ico")), tr("Floating"), this);
    //m_pUnFloating = new QAction(QIcon(tr("images/open.ico")), tr("UnFloating"), this);
    connect(m_pFloating, SIGNAL(triggered()), this, SLOT(floatingAction()));
    //connect(m_pUnFloating, SIGNAL(triggered()), this, SLOT(unFloatingAction()));
    createContentMenu();
#endif
    //connect(ui.lineFilePath, SIGNAL(triggered()), this, SLOT(floatingAction()));
    //ui.radioButtonFile->setChecked(true);
    setupDefaultValue();
    radioButtonClicked();
    m_pVideo = new VSCVWidget(m_nId, this);

    QVBoxLayout* layout = new QVBoxLayout();

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

    ui.widget->setLayout(layout);

    PreView();

    SetupConnections();
}
Ejemplo n.º 8
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));
}
Ejemplo n.º 9
0
VSCSearch::VSCSearch(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
	m_nSearchCnt = 0;
	m_bSelectedAll = FALSE;
	m_DeviceSearcher = NULL;
	QList<QHostAddress> hostAddr = DeviceSearcher::getHostAddress();
	QList<QHostAddress>::iterator i;
	for(i=hostAddr.begin();i!=hostAddr.end();i++)
	{
		
		ui.comboBox->addItem((*i).toString());
	}


    SetupConnections();
}
Ejemplo n.º 10
0
VirtualKeyboard::VirtualKeyboard(imli_context_t ctx, const std::vector<QTextCharFormat>& styles, QWidget* parent)
    : QFrame(parent), context_(ctx), styles_(styles), shifted_(false)
{
	setupUi(this);
    //setMinimumSize(270, 120);
    //SetupWidgets();
	initCharNameMapping();
	SetupConnections();
	
	//To make sure the QPushButtons don't get focus
	const QObjectList& objects = this->verticalLayoutWidget->children();
	for (int i = 0; i < objects.size(); i++)
	{
		QPushButton* button = qobject_cast<QPushButton*>(objects.at(i));
		if (button)
		{
			button->setFocusPolicy(Qt::NoFocus);
		}
	}
    
}
Ejemplo n.º 11
0
VSCSetting::VSCSetting(QWidget *parent, VSCDeviceList &pDeviceList)
    : QWidget(parent), m_DeviceList(pDeviceList)
{
	ui.setupUi(this);
	SetupConnections();

	m_License = new VSCLicense();
	m_Version = new VSCVersion();
	m_User = new VSCUser();
	m_Language = new VSCLanguage();
	m_Layout = new QVBoxLayout();

	m_HdfsRecord = new VSCHdfsRecord();
	m_RtspRtp = new VSCRtspRtp();
	m_OAPI = new VSCOAPI();
	m_VideoSetting = new VSCVideoSetting();

	m_MiningSetting = new VSCMiningSetting();

	m_Layout->setMargin(0);

	ui.widget->setLayout(m_Layout);
}
Ejemplo n.º 12
0
VSCDeviceList::VSCDeviceList(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
	/* Add Group first */
	VGroupTreeUpdated();
	CameraTreeUpdated();
	DiskTreeUpdated();
	VmsTreeUpdated();
	ViewTreeUpdated();
	VIPCTreeUpdated();

	SetupConnections();
	m_Timer = new QTimer(this);
	//connect(m_Timer,SIGNAL(timeout()),this,SLOT(UpdateOnline()));  
	//m_Timer->start(1000 * 3); 

	m_TimerDisk = new QTimer(this);
	connect(m_TimerDisk,SIGNAL(timeout()),this,SLOT(DiskTreeUpdated()));
	/* Disk 60s update */
	m_TimerDisk->start(1000 * 15);
	gFactory->RegDeviceChangeNotify((void *)this, 
				(FactoryDeviceChangeNotify)(VSCDeviceList::DeviceChangeCallbackFunc));


	//ui.pbRecorder->hide();
	//ui.lbRecorder->hide();
	
	//ui.pbDmining->hide();
	//ui.lbMining->hide();
	
	//ui.pbEmap->hide();
	//ui.lbEmap->hide();


}
Ejemplo n.º 13
0
////////////////////////////////////////
//Public
/////////////////////////////////////
LoadingBar::LoadingBar() : QDialog(NULL)
{
    SetupUI(true);
	SetupConnections();
}
Ejemplo n.º 14
0
MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){
  ui->setupUi(this); //load the designer form
  canwrite = false;
  UpdateIcons(); //Set all the icons in the dialog
  SetupConnections();
}