void VSCMainWindows::DeleteCamera(int nId) { VDC_DEBUG( "%s %d\n",__FUNCTION__, nId); QMessageBox msgBox(this); //Set text msgBox.setText(tr("Delete the Camera ...")); //Set predefined icon, icon is show on left side of text. msgBox.setIconPixmap(QPixmap(":/logo/resources/vsc32.png")); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); //Set focus of ok button msgBox.setDefaultButton(QMessageBox::Ok); //execute message box. method exec() return the button value of cliecke button int ret = msgBox.exec(); switch (ret) { case QMessageBox::Ok: gFactory->DelDevice(nId); emit CameraDeleted(); break; default: // should never be reached break; } return; }
void VSCMainWindows::DeleteCamera(s32 nId) { VDC_DEBUG( "%s %d\n",__FUNCTION__, nId); QMessageBox msgBox; //Set text msgBox.setText("Delete the Camera ..."); //Set predefined icon, icon is show on left side of text. msgBox.setIcon(QMessageBox::Information); //set inforative text //msgBox.setInformativeText("Just show infornation."); //Add ok and cancel button. msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); //Set focus of ok button msgBox.setDefaultButton(QMessageBox::Ok); //execute message box. method exec() return the button value of cliecke button int ret = msgBox.exec(); //User get input from returned value (ret). you can handle it here. switch (ret) { case QMessageBox::Ok: gFactory->DelDevice(nId); emit CameraDeleted(); break; default: // should never be reached break; } return; }
void VSCDeviceTrash::dropEvent(QDropEvent *event) { int nId = atoi(event->mimeData()->text().toLatin1().data()); VDC_DEBUG( "%s Enter in dropEvent id %d\n",__FUNCTION__, nId); VDC_DEBUG( "%s %d\n",__FUNCTION__, nId); QMessageBox msgBox; //Set text msgBox.setText("Delete the Camera ..."); msgBox.setIcon(QMessageBox::Information); //Set predefined icon, icon is show on left side of text. msgBox.setIconPixmap(QPixmap(":/logo/resources/vsc32.png")); //set inforative text //msgBox.setInformativeText("Just show infornation."); //Add ok and cancel button. msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); //Set focus of ok button msgBox.setDefaultButton(QMessageBox::Ok); //execute message box. method exec() return the button value of cliecke button int ret = msgBox.exec(); //User get input from returned value (ret). you can handle it here. switch (ret) { case QMessageBox::Ok: gFactory->DelDevice(nId); emit CameraDeleted(); break; default: // should never be reached break; } }
void VSCMainWindows::SetupConnections() { connect(m_pMainArea, SIGNAL(tabCloseRequested(int)), this, SLOT(MainCloseTab(int))); connect(m_pDeviceList, SIGNAL(SurveillanceClicked()), this, SLOT(AddSurveillance())); connect(m_pDeviceList, SIGNAL(CameraAddClicked()), this, SLOT(AddCamera())); connect(m_pDeviceList, SIGNAL(SearchClicked()), this, SLOT(Search())); connect(m_pDeviceList, SIGNAL(CameraEditClicked(int)), this, SLOT(EditCamera(int))); connect(m_pDeviceList, SIGNAL(CameraDeleteClicked(int)), this, SLOT(DeleteCamera(int))); connect(this, SIGNAL(CameraDeleted()), m_pDeviceList, SLOT(CameraTreeUpdated())); }
void VSCDeviceList::SetupConnections() { connect(ui.pbSurveillance, SIGNAL(clicked()), this, SLOT(SurveillanceClick())); connect(ui.pbCamera, SIGNAL(clicked()), this, SLOT(CameraAddClick())); connect(ui.pbEmap, SIGNAL(clicked()), this, SLOT(EmapClick())); connect(ui.pbDmining, SIGNAL(clicked()), this, SLOT(DminingClick())); connect(ui.pbSearch, SIGNAL(clicked()), this, SLOT(SearchClick())); connect(ui.pbRecorder, SIGNAL(clicked()), this, SLOT(RecorderClick())); connect(ui.pbVIPC, SIGNAL(clicked()), this, SLOT(VIPCAddClick())); connect(ui.treeWidget, SIGNAL(CameraAddClicked()), this, SIGNAL(CameraAddClicked())); connect(ui.treeWidget, SIGNAL(CameraEditClicked(int)), this, SIGNAL(CameraEditClicked(int))); connect(ui.treeWidget, SIGNAL(CameraDeleteClicked(int)), this, SIGNAL(CameraDeleteClicked(int))); connect(ui.treeWidget, SIGNAL(StartRecordAllClicked()), this, SLOT(StartRecordAll())); connect(ui.treeWidget, SIGNAL(StopRecordAllClicked()), this, SLOT(StopRecordAll())); connect(ui.treeWidget, SIGNAL(StartHdfsRecordAllClicked()), this, SLOT(StartHdfsRecordAll())); connect(ui.treeWidget, SIGNAL(StopHdfsRecordAllClicked()), this, SLOT(StopHdfsRecordAll())); /* VIPC */ connect(ui.treeWidget, SIGNAL(VIPCAddClicked()), this, SIGNAL(VIPCAddClicked())); connect(ui.treeWidget, SIGNAL(VIPCEditClicked(int)), this, SIGNAL(VIPCEditClicked(int))); connect(ui.treeWidget, SIGNAL(VIPCDeleteClicked(int)), this, SIGNAL(VIPCDeleteClicked(int))); /* View */ connect(ui.treeWidget, SIGNAL(ViewDeleteClicked(int)), this, SIGNAL(ViewDeleteClicked(int))); connect(ui.treeWidget, SIGNAL(DiskEditClicked()), this, SIGNAL(DiskEditClicked())); connect(ui.pbTrash, SIGNAL(CameraDeleted()), this, SLOT(CameraTreeUpdated())); /* Group */ connect(ui.treeWidget, SIGNAL(VGroupAddClicked()), this, SIGNAL(VGroupAddClicked())); connect(ui.treeWidget, SIGNAL(VGroupEditClicked(int)), this, SIGNAL(VGroupEditClicked(int))); connect(ui.treeWidget, SIGNAL(VGroupDeleteClicked(int)), this, SIGNAL(VGroupDeleteClicked(int))); connect(ui.treeWidget, SIGNAL(VGroupMapClicked()), this, SIGNAL(VGroupMapClicked())); /* VMS */ connect(ui.treeWidget, SIGNAL(VMSDeleteClicked(int)), this, SIGNAL(VMSDeleteClicked(int))); }