KDvoid TestLocation::onEvent ( const KDEvent* pEvent ) { if ( pEvent->type == KD_EVENT_LOCATION ) { if ( s_nSubTestIndex == 0 && pEvent->data.value.i == KD_NMEA_UPDATED_USER ) { onRefresh ( KD_FALSE ); } else if ( s_nSubTestIndex == 1 && pEvent->data.value.i == KD_NMEA_UPDATED_GPS ) { onRefresh ( KD_TRUE ); } } else if ( pEvent->type == KD_EVENT_PROVIDER ) { const KDchar* szProvider = "Received From Unknown"; switch ( pEvent->data.value.i ) { case XM_PROVIDER_GPS : szProvider = "Received From GPS"; break; case XM_PROVIDER_NETWORK : szProvider = "Received From Network"; break; case XM_PROVIDER_PASSIVE : szProvider = "Received From Passive"; break; } m_pSubTitle->setString ( szProvider ); } }
void CApp::onAppSelect(GnmsApp* app) { // pull us into non-fullscreen mode so the // other app can have the full screen buffer SDL_SetVideoMode(WWIDTH, WHEIGHT, 32, SDL_SWSURFACE | SDL_DOUBLEBUF); tuioClient->disconnect(); system(app->getExe().c_str()); tuioClient->connect(); // go back into fullscreen mode #if GNMS_OS_NO_FULLSCREEN == 0 SDL_SetVideoMode(WWIDTH, WHEIGHT, 32, SDL_SWSURFACE | SDL_DOUBLEBUF | SDL_FULLSCREEN); #endif // move app to top of init file modifyInitFile(app->getName()); // reinitialize the menu onRefresh(); return; }
/* @TODO: Delete */ void CApp::onLButtonDown(int x, int y) { vector< GnmsApp*> appList = gnmsApps[curPage]; vector< GnmsApp*>::iterator it; for (it=appList.begin(); it!=appList.end(); it++) { if (*it == NULL) { continue; } else { float appX = (*it)->getX(); if (x > appX && x < appX+TILE_WIDTH) { float appY = (*it)->getY(); if (y > appY && y < appY+TILE_HEIGHT) { onAppSelect(*it); } } } } if (x > USBsymbol->getX() && x < USBsymbol->getX()+50) { if (y > USBsymbol->getY() && y < USBsymbol->getY()+23) { system("../gnms_scripts/gnms_load_app_from_usb.py"); onRefresh(); } } return; }
/*! \brief Create the context menu for the modules tree. */ void ApplicationViewWidget::createModulesViewContextMenu() { modRunAction = new QAction("Run",this); modStopAction = new QAction("Stop",this); modkillAction = new QAction("Kill",this); modSeparator = new QAction(this); modSeparator->setSeparator(true); modRefreshAction = new QAction("Refresh Status",this); modSelectAllAction = new QAction("Select All Modules",this); modAttachAction = new QAction("Attach to stdout",this); modAssignAction = new QAction("Assign Hosts",this); modRunAction->setIcon(QIcon(":/images/run_ico.png")); modStopAction->setIcon(QIcon(":/images/stop_ico.png")); modkillAction->setIcon(QIcon(":/images/kill_ico.png")); modRefreshAction->setIcon(QIcon(":/images/progress_ico.png")); modSelectAllAction->setIcon(QIcon(":/images/selectall_ico.png")); modAssignAction->setIcon(QIcon(":/images/yesres_ico.png")); ui->moduleList->addAction(modRunAction); ui->moduleList->addAction(modStopAction); ui->moduleList->addAction(modkillAction); ui->moduleList->addAction(modSeparator); ui->moduleList->addAction(modRefreshAction); ui->moduleList->addAction(modSelectAllAction); ui->moduleList->addAction(modAttachAction); ui->moduleList->addAction(modAssignAction); connect(modRunAction,SIGNAL(triggered()),this,SLOT(onRun())); connect(modStopAction,SIGNAL(triggered()),this,SLOT(onStop())); connect(modkillAction,SIGNAL(triggered()),this,SLOT(onKill())); connect(modRefreshAction,SIGNAL(triggered()),this,SLOT(onRefresh())); connect(modSelectAllAction,SIGNAL(triggered()),this,SLOT(selectAllModule())); }
int NetScanningController::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: newData((*reinterpret_cast< const QList<Device*>(*)>(_a[1]))); break; case 1: infInformation((*reinterpret_cast< SVT_NotifyType(*)>(_a[1]))); break; case 2: deviceCountChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: newDeviceNotify((*reinterpret_cast< SVT_NotifyType(*)>(_a[1]))); break; case 4: routerTypeChanged(); break; case 5: gatewayChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 6: onNewData((*reinterpret_cast< SVT_NotifyType(*)>(_a[1]))); break; case 7: onInfInformation((*reinterpret_cast< SVT_NotifyType(*)>(_a[1]))); break; case 8: onCountChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: onNode2Device((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< Device*(*)>(_a[2]))); break; case 10: onDeviceDataChanged((*reinterpret_cast< const Device(*)>(_a[1]))); break; case 11: onRefresh(); break; case 12: onSubscribeData((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 13: startScan(); break; default: ; } _id -= 14; } return _id; }
/*! \brief Refresh all*/ void ApplicationViewWidget::refresh() { selectAllConnections(true); selectAllModule(true); selectAllResources(true); onRefresh(); }
//----------------------------------------------------------------------------- // Function: BusIfPortmapTab::refresh() //----------------------------------------------------------------------------- void BusIfPortmapTab::refresh() { view_.update(); model_.reset(); // the lists are refreshed onRefresh(); }
void LLFloaterTopObjects::onGetByOwnerName(LLUICtrl* ctrl, void* data) { if (sInstance) { sInstance->mFlags = STAT_FILTER_BY_OWNER; sInstance->mFilter = sInstance->childGetText("owner_name_editor"); onRefresh(NULL); } }
/*! \brief Create the context menu for the connections tree. */ void ApplicationViewWidget::createConnectionsViewContextMenu() { connContex = new QMenu(ui->connectionList); connSubMenu = new QMenu("Inspect",connContex); connConnectAction = new QAction("Connect",connContex); connDisconnectAction = new QAction("Disconnect",connContex); connSeparatorAction = new QAction(connContex); connSeparatorAction->setSeparator(true); connRefreshAction = new QAction("Refresh Status",connContex); connSelectAllAction = new QAction("Select All Connections",connContex); conn1SeparatorAction = new QAction(connContex); conn1SeparatorAction->setSeparator(connContex); connYARPViewAction = new QAction("yarpview",connSubMenu); connYARPReadAction = new QAction("yarpread",connSubMenu); connYARPHearAction = new QAction("yarphear",connSubMenu); connYARPScopeAction = new QAction("yarpscope",connSubMenu); connSelectAllAction->setIcon(QIcon(":/select-all22.svg")); connRefreshAction->setIcon(QIcon(":/refresh22.svg")); connConnectAction->setIcon(QIcon(":/connect22.svg")); connDisconnectAction->setIcon(QIcon(":/disconnect22.svg")); connect(connConnectAction,SIGNAL(triggered()),this,SLOT(onConnect())); connect(connDisconnectAction,SIGNAL(triggered()),this,SLOT(onDisconnect())); connect(connRefreshAction,SIGNAL(triggered()),this,SLOT(onRefresh())); connect(connSelectAllAction,SIGNAL(triggered()),this,SLOT(selectAllConnections())); connect(connYARPViewAction,SIGNAL(triggered()),this,SLOT(onYARPView())); connect(connYARPReadAction,SIGNAL(triggered()),this,SLOT(onYARPRead())); connect(connYARPHearAction,SIGNAL(triggered()),this,SLOT(onYARPHear())); connect(connYARPScopeAction,SIGNAL(triggered()),this,SLOT(onYARPScope())); connContex->addAction(connConnectAction); connContex->addAction(connDisconnectAction); connContex->addAction(connSeparatorAction); connContex->addAction(connRefreshAction); connContex->addAction(connSelectAllAction); connContex->addAction(conn1SeparatorAction); connContex->addMenu(connSubMenu); connSubMenu->addAction(connYARPViewAction); connSubMenu->addAction(connYARPReadAction); connSubMenu->addAction(connYARPHearAction); connSubMenu->addAction(connYARPScopeAction); ui->connectionList->setContextMenu(connContex); }
/*! \brief Create the context menu for the resources tree. */ void ApplicationViewWidget::createResourcesViewContextMenu() { resRefreshAction = new QAction("Refresh Status", this); resSelectAllAction = new QAction("Select All Resources", this); resRefreshAction->setIcon(QIcon(":/images/progress_ico.png")); resSelectAllAction->setIcon(QIcon(":/images/selectall_ico.png")); ui->resourcesList->addAction(resRefreshAction); ui->resourcesList->addAction(resSelectAllAction); connect(resRefreshAction,SIGNAL(triggered()),this,SLOT(onRefresh())); connect(resSelectAllAction,SIGNAL(triggered()),this,SLOT(selectAllResources())); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); db=QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("mydb.sqlite"); db.setPassword("qwerty"); if(!db.open()){ QMessageBox::information(this,"Message","Not connected"); } //QString str="create table 'student'('number' integer PRIMARY KEY NOT NULL, 'fio' VARCHAR(36), 'group' integer);"; /*model = new QSqlTableModel(0, db); model->setTable("student2"); // Имя таблицы базы данных. model->select(); ui->tableView->setModel(model);*/ ui->pushButton->setEnabled(false); ui->pushButton_4->setEnabled(false); ui->pushButton_5->setEnabled(false); ui->pushButton_3->setEnabled(false); formd=new DialogUpdate(this); form=new Dialog(this); forms=new Dialogsearch(this); forml=new Dialoglogin(this); //connect(ui->pushButton_4,SIGNAL(clicked()),this,SLOT(onButtonSend())); connect(this,SIGNAL(sendData(QString,QString,QString)),formd,SLOT(recieveData(QString,QString,QString))); connect(form,SIGNAL(refresh()),this,SLOT(onRefresh())); connect(formd,SIGNAL(refresh()),this,SLOT(onRefresh())); connect(forml,SIGNAL(sendLogin(QString, QString,QString)),this,SLOT(onLogin(QString,QString,QString))); connect(this,SIGNAL(sendTable(QString)),form,SLOT(onTable(QString))); connect(this,SIGNAL(sendTable(QString)),formd,SLOT(onTable(QString))); connect(this,SIGNAL(sendTable(QString)),forms,SLOT(onTable(QString))); QMessageBox::information(this,"Warnign!","You are working in costumer mod"); ui->listWidget->addItems(db.tables()); ui->lineEdit->setText("create table 'student'('number' integer PRIMARY KEY NOT NULL, 'fio' VARCHAR(36), 'group' integer)"); }
int RadioInfoForm::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: onSave(); break; case 1: onRefresh(); break; case 2: requestReceived((*reinterpret_cast< QNetworkReply*(*)>(_a[1]))); break; default: ; } _id -= 3; } return _id; }
bool CApp::onSingleTouch(float x, float y) { bool retVal = false; vector< GnmsApp*> appList = gnmsApps[curPage]; vector< GnmsApp*>::iterator it; for (it=appList.begin(); it!=appList.end(); it++) { if (*it == NULL) { // this should be cause for alarm // but we're going to ignore it for now continue; } else { float appX = (*it)->getX(); if (x > appX && x < appX+TILE_WIDTH) { float appY = (*it)->getY(); if (y > appY && y < appY+TILE_HEIGHT) { onAppSelect(*it); retVal = true; } } } } if (x > USBsymbol->getX() && x < USBsymbol->getX()+USB_WIDTH) { if (y > USBsymbol->getY() && y < USBsymbol->getY()+USB_HEIGHT) { string temp = GNMS_LOAD_USB; system(temp.c_str()); onRefresh(); retVal = true; } } if (gnmsApps.size() > (curPage+1)*4 && (x > 475 && x < 810 && y > 900)) { onNextPage(); } if (curPage > 0 && (x > 475 && x < 810 && y > 630 && y < 650)) { onPrevPage(); } return retVal; }
PhGraphicView::PhGraphicView(QWidget *parent, PhGraphicView *shareWidget) : QGLWidget(parent, shareWidget), _settings(NULL), _dropDetected(0), _maxRefreshRate(0), _maxPaintDuration(0), _lastUpdateDuration(0), _maxUpdateDuration(0), _previousNsecsElapsed(0) { _refreshTimer = new QTimer(this); connect(_refreshTimer, SIGNAL(timeout()), this, SLOT(onRefresh())); //set the screen frequency to the most common value (60hz); _screenFrequency = QGuiApplication::primaryScreen()->refreshRate(); int timerInterval = static_cast<int>(500.0 / _screenFrequency); _refreshTimer->start( timerInterval); //PHDEBUG << "Refresh rate set to " << _screenFrequency << "hz, timer restart every" << timerInterval << "ms"; _dropTimer.start(); _timer.start(); }
PidDlg::PidDlg(QString partname, int jointIndex,QWidget *parent) : QDialog(parent), ui(new Ui::PidDlg) { ui->setupUi(this); this->jointIndex = jointIndex; QString title = QString("Pid Control %1 JNT:%2").arg(partname).arg(jointIndex); setWindowTitle(title); connect(ui->btnRefresh, SIGNAL(clicked()), this, SLOT(onRefresh())); connect(ui->btnSend,SIGNAL(clicked()),this,SLOT(onSend())); connect(ui->btnCancel,SIGNAL(clicked()),this,SLOT(onCancel())); ui->tablePosition->setItemDelegate(new TableDoubleDelegate); ui->tableVelocity->setItemDelegate(new TableDoubleDelegate); ui->tableTorque->setItemDelegate(new TableDoubleDelegate); ui->tableStiffness->setItemDelegate(new TableDoubleDelegate); ui->tableOpenloop->setItemDelegate(new TableDoubleDelegate); ui->tableCurrent->setItemDelegate(new TableDoubleDelegate); ui->tableCurrent->setItemDelegate(new TableGenericDelegate); }
/*! \brief Create the context menu for the modules tree. */ void ApplicationViewWidget::createModulesViewContextMenu() { modRunAction = new QAction("Run",this); modStopAction = new QAction("Stop",this); modkillAction = new QAction("Kill",this); modSeparator = new QAction(this); modSeparator->setSeparator(true); modRefreshAction = new QAction("Refresh Status",this); modSelectAllAction = new QAction("Select All Modules",this); modAttachAction = new QAction("Attach to stdout",this); modAssignAction = new QAction("Assign Hosts",this); modRunAction->setIcon(QIcon(":/play22.svg")); modStopAction->setIcon(QIcon(":/stop22.svg")); modkillAction->setIcon(QIcon(":/kill22.svg")); modRefreshAction->setIcon(QIcon(":/refresh22.svg")); modSelectAllAction->setIcon(QIcon(":/select-all22.svg")); modAssignAction->setIcon(QIcon(":/computer-available22.svg")); ui->moduleList->addAction(modRunAction); ui->moduleList->addAction(modStopAction); ui->moduleList->addAction(modkillAction); ui->moduleList->addAction(modSeparator); ui->moduleList->addAction(modRefreshAction); ui->moduleList->addAction(modSelectAllAction); ui->moduleList->addAction(modAttachAction); ui->moduleList->addAction(modAssignAction); connect(modRunAction,SIGNAL(triggered()),this,SLOT(onRun())); connect(modStopAction,SIGNAL(triggered()),this,SLOT(onStop())); connect(modkillAction,SIGNAL(triggered()),this,SLOT(onKill())); connect(modRefreshAction,SIGNAL(triggered()),this,SLOT(onRefresh())); connect(modSelectAllAction,SIGNAL(triggered()),this,SLOT(selectAllModule())); connect(modAttachAction,SIGNAL(triggered()),this,SLOT(onAttachStdout())); connect(modAssignAction,SIGNAL(triggered()),this,SLOT(onAssignHost())); }
void LLFloaterTopObjects::onGetByOwnerName() { mFlags = STAT_FILTER_BY_OWNER; mFilter = getChild<LLUICtrl>("owner_name_editor")->getValue().asString(); onRefresh(); }
//----------------------------------------------------------------------------- // Function: BusIfPortmapTab::BusIfPortmapTab() //----------------------------------------------------------------------------- BusIfPortmapTab::BusIfPortmapTab( LibraryInterface* libHandler, QSharedPointer<Component> component, BusInterface* busif, QWidget* parent ): QWidget(parent), busif_(busif), component_(component), libHandler_(libHandler), model_(busif, component, libHandler, this), view_(this), logicalView_(this), logicalModel_(libHandler, &model_, this), mappingLabel_(tr("Bit-field mapping"),this), mappingView_(component, this), mappingProxy_(this), mappingModel_(busif, component, libHandler, this), physicalView_(this), physProxy_(component, this), physModel_(component, &model_, this), cleanButton_(QIcon(":/icons/common/graphics/cleanup.png"), tr("Clean up"), this), connectButton_(QIcon(":/icons/common/graphics/connect.png"), tr("Connect"), this), showAllButton_(tr("Show all ports in component"), this), showHideMappingButton_(tr("Show bit-field mapping"),this), nameFilterEditor_(new QLineEdit(this)), inButton_(QIcon(":/icons/common/graphics/control-180.png"), "", this), outButton_(QIcon(":/icons/common/graphics/control.png"), "", this), hideConnectedBox_(tr("Hide connected ports"), this), portSet_() { view_.setModel(&model_); view_.setItemDelegate(new PortMapsDelegate(this)); mappingView_.setDragDropMode(QAbstractItemView::DropOnly); mappingView_.setAcceptDrops(true); mappingProxy_.setSourceModel(&mappingModel_); mappingView_.setModel(&mappingProxy_); mappingLabel_.hide(); mappingView_.hide(); // Set view to be sortable. mappingProxy_.setSortCaseSensitivity(Qt::CaseInsensitive); mappingView_.setSortingEnabled(true); mappingView_.sortByColumn(BitMappingModel::INDEX, Qt::AscendingOrder); hideConnectedBox_.setCheckState(Qt::Checked); // Set the sources for views. logicalView_.setModel(&logicalModel_); physProxy_.setSourceModel(&physModel_); physicalView_.setModel(&physProxy_); // Remove the ports from the port lists that are already mapped. logicalModel_.removePorts(model_.logicalPorts()); setupLayout(); // By default, show all button is not visible, but setting physical ports sets visible. showAllButton_.setVisible(false); inButton_.setToolTip(tr("Filter ports by direction in")); outButton_.setToolTip(tr("Filter ports by direction out")); nameFilterEditor_->setToolTip(tr("Filter ports by name")); setTabOrder(&inButton_, &outButton_); setTabOrder(&outButton_, nameFilterEditor_); setTabOrder(nameFilterEditor_, &physicalView_); // Connect signals from model. connect(&model_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection); connect(&model_, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SIGNAL(contentChanged()), Qt::UniqueConnection); connect(&model_, SIGNAL(errorMessage(const QString&)), this, SIGNAL(errorMessage(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(noticeMessage(const QString&)), this, SIGNAL(noticeMessage(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(logicalRemoved(const QString&)), &logicalModel_, SLOT(addPort(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(logicalRemoved(const QString&)), &mappingModel_, SLOT(onRemoveMapping(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(logicalRestored(const QString&)), &logicalModel_, SLOT(addPort(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(logicalRestored(const QString&)), &logicalView_, SLOT(onPortRestored(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(physicalRemoved(const QString&)), &physModel_, SLOT(addPort(const QString&)), Qt::UniqueConnection); connect(&model_, SIGNAL(physicalRemoved(const QString&)), &physProxy_, SLOT(onPortDisconnected(const QString&)), Qt::UniqueConnection); // Connect signals from logical view. connect(&logicalView_, SIGNAL(removeItem(const QModelIndex&)), &logicalModel_, SLOT(removeItem(const QModelIndex&)), Qt::UniqueConnection); connect(&logicalView_, SIGNAL(removeItems(const QModelIndexList&)), &logicalModel_, SLOT(removeItems(const QModelIndexList&)), Qt::UniqueConnection); connect(&logicalView_, SIGNAL(makeConnection(const QStringList&, const QStringList&)), this, SLOT(onMakeConnections(const QStringList&, const QStringList&)), Qt::UniqueConnection); connect(&logicalView_, SIGNAL(moveItems(const QStringList&, const QModelIndex&)), &logicalModel_, SLOT(onMoveItems(const QStringList&, const QModelIndex&)), Qt::UniqueConnection); connect(&logicalView_, SIGNAL(clicked(const QModelIndex&)), this, SLOT(onLogicalChanged(const QModelIndex&)), Qt::UniqueConnection); // Connect signals from physical view. connect(&physicalView_, SIGNAL(makeConnection(const QStringList&, const QStringList&)), this, SLOT(onMakeConnections(const QStringList&, const QStringList&)), Qt::UniqueConnection); connect(&physicalView_, SIGNAL(moveItems(const QStringList&, const QModelIndex&)), &physModel_, SLOT(onMoveItems(const QStringList&, const QModelIndex&)), Qt::UniqueConnection); // Connect signals from logical model. connect(&logicalModel_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection); connect(&logicalModel_, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SIGNAL(contentChanged()), Qt::UniqueConnection); // Connect signal from physical model. connect(&physModel_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection); connect(&physModel_, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)), this, SIGNAL(contentChanged()), Qt::UniqueConnection); // Connect signals from physical port filters. connect(nameFilterEditor_, SIGNAL(textChanged(const QString&)), &physProxy_, SLOT(setFilterPortName(const QString&)), Qt::UniqueConnection); connect(nameFilterEditor_, SIGNAL(textChanged(const QString&)), &physicalView_, SLOT(onFilterNameChanged(const QString&)), Qt::UniqueConnection); connect(&inButton_, SIGNAL(clicked(bool)), &physProxy_, SLOT(setFilterInDirection(bool)), Qt::UniqueConnection); connect(&outButton_, SIGNAL(clicked(bool)), &physProxy_, SLOT(setFilterOutDirection(bool)), Qt::UniqueConnection); // Connect signals from bit-field mapping model. connect(&mappingModel_, SIGNAL(errorMessage(const QString&)), this, SIGNAL(errorMessage(const QString&)), Qt::UniqueConnection); connect(&mappingModel_, SIGNAL(logicalPortSet(const QString&)), &mappingView_, SLOT(onLogicalPortChanged(const QString&)), Qt::UniqueConnection); // Connect signals from toolbar buttons. connect(&cleanButton_, SIGNAL(clicked(bool)), this, SLOT(onRefresh()), Qt::UniqueConnection); connect(&connectButton_, SIGNAL(clicked(bool)), this, SLOT(onConnect()), Qt::UniqueConnection); connect(&showHideMappingButton_, SIGNAL(clicked(bool)), this, SLOT(toggleMappingVisibility()), Qt::UniqueConnection); connect(&hideConnectedBox_, SIGNAL(toggled(bool)), &physProxy_, SLOT(setFilterHideConnected(bool)), Qt::UniqueConnection); connect(&showAllButton_, SIGNAL(clicked(bool)), this, SLOT(onShowAll()), Qt::UniqueConnection); }
SkpFileWidget::SkpFileWidget(QWidget *parent) : QWidget(parent), ui(new Ui::SkpFileWidget), m_mouseMoveColor(QColor(193, 210, 240, 50)), m_defaultBackgroundColor(QColor(255, 255, 255)), m_currMouseRow(-1) { ui->setupUi(this); SkpTransferFile::createThread(5); m_signal = new SkpSignal(NULL, 0); m_signalCallback = new SkpSignal(NULL, 0); auto func = std::bind(&SkpFileWidget::registerCallbackChat, this, std::placeholders::_1); m_signal->emit_register_ack(MessageClass_MemoryFile, func); m_signal->emit_register_ack(MessageClass_Chat, func); connect(this, SIGNAL(sigFriendChat(QByteArray)), this, SLOT(onFriendChat(QByteArray))); connect(ui->pushFile_pushButton,SIGNAL(clicked()), this, SLOT(onPushFile())); connect(ui->refresh_pushButton, SIGNAL(clicked()), this, SLOT(onRefresh())); QStringList header; header << tr("name") << tr("md5") << tr("offset") << tr("lenth") << tr("服务器文件状态") << tr("请求状态") << tr("%"); ui->tableWidget->setColumnCount(header.size()); ui->tableWidget->setHorizontalHeaderLabels(header); ui->tableWidget->horizontalHeader()->setStretchLastSection(true); ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); ui->tableWidget->setContextMenuPolicy(Qt::CustomContextMenu); ui->tableWidget->setShowGrid(false); //设置不显示格子线 ui->tableWidget->verticalHeader()->setVisible(false); //设置垂直头不可见 ui->tableWidget->setFrameShape(QFrame::NoFrame); //设置无边框 ui->tableWidget->horizontalHeader()->setHighlightSections(false); ui->tableWidget->setItemDelegate(new NoFocusDelegate()); ui->tableWidget->setMouseTracking(true); ui->tableWidget->horizontalHeader()->setHighlightSections(false); connect(ui->tableWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomContextMenuRequested(QPoint))); connect(ui->tableWidget, SIGNAL(cellEntered(int,int)), this, SLOT(onCellEntered(int,int))); connect(ui->tableWidget, SIGNAL(cellClicked(int,int)), this, SLOT(onCellClicked(int,int))); header.clear(); header << tr("code") << tr("name") << tr("password"); ui->friend_tableWidget->setColumnCount(header.size()); ui->friend_tableWidget->setHorizontalHeaderLabels(header); ui->friend_tableWidget->horizontalHeader()->setStretchLastSection(true); ui->friend_tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->friend_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); ui->friend_tableWidget->setContextMenuPolicy(Qt::CustomContextMenu); ui->friend_tableWidget->setShowGrid(false); //设置不显示格子线 ui->friend_tableWidget->verticalHeader()->setVisible(false); //设置垂直头不可见 ui->friend_tableWidget->setFrameShape(QFrame::NoFrame); //设置无边框 ui->friend_tableWidget->horizontalHeader()->setHighlightSections(false); ui->friend_tableWidget->setItemDelegate(new NoFocusDelegate()); ui->friend_tableWidget->setMouseTracking(true); ui->friend_tableWidget->horizontalHeader()->setHighlightSections(false); connect(ui->refreshFriend_pushButton, SIGNAL(clicked()), this, SLOT(onRefreshFriend())); connect(this, SIGNAL(sigRefreshFriend(QByteArray)), this, SLOT(onRefreshFriend(QByteArray))); connect(ui->friend_tableWidget, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), this, SLOT(onTtemDoubleClicked(QTableWidgetItem*))); m_menu = new QMenu(ui->tableWidget); m_pullAction = new QAction("down", this); connect(m_pullAction, SIGNAL(triggered()), this, SLOT(onPullAction())); m_menu->addAction(m_pullAction); m_startAction = new QAction("start", this); connect(m_startAction, SIGNAL(triggered()), this, SLOT(onStartAction())); m_menu->addAction(m_startAction); m_stopAction = new QAction("stop", this); connect(m_stopAction, SIGNAL(triggered()), this, SLOT(onStopAction())); m_menu->addAction(m_stopAction); m_deleteAction = new QAction("delete", this); connect(m_deleteAction, SIGNAL(triggered()), this, SLOT(onDeleteAction())); m_menu->addAction(m_deleteAction); onRefresh(); onRefreshFriend(); }
void StandardPresenter::onTextModified( PresentableField * pField, int ofs, int charsRemoved, int charsAdded ) { onRefresh(pField); }
void show() { onRefresh(); mp_Dialog->show(); }
void LLFloaterTopObjects::onGetByOwnerName() { mFlags = STAT_FILTER_BY_OWNER; mFilter = childGetText("owner_name_editor"); onRefresh(); }
void LLFloaterTopObjects::onGetByObjectName() { mFlags = STAT_FILTER_BY_OBJECT; mFilter = childGetText("object_name_editor"); onRefresh(); }