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(); }
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(); }
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)); }
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) : QMainWindow(parent, flags) { setMinimumSize(QSize(300, 200)); setWindowTitle(TITLE); setDockNestingEnabled(true); resize(850, 650); // Set QMainWindow in the center of desktop QRect rect = geometry(); rect.moveCenter(QApplication::desktop()->availableGeometry().center()); setGeometry(rect); _mainDescTextBox = new QspTextBox(this); setCentralWidget(_mainDescTextBox); CreateDockWindows(); CreateMenuBar(); LoadSettings(); }