void CHilitButton::OnLButtonDblClk(UINT nFlags, CPoint point) { CMFCButton::OnLButtonDblClk(nFlags, point); if (m_bEnableDoubleClick && onDoubleClicked) { onDoubleClicked(); } m_bWasDoublelClick = TRUE; }
ListView::ListView(QWidget* parent) : QListView(parent) { setFocusPolicy(Qt::NoFocus); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); #ifdef Q_OS_MAC setVerticalScrollMode(ScrollPerPixel); #endif setItemDelegate(new ListDelegate(this)); d.model = new IrcUserModel(this); d.model->setSortMethod(Irc::SortByTitle); setModel(d.model); connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onDoubleClicked(QModelIndex))); }
EstelBrowserWidget::EstelBrowserWidget(QWidget *parent) : QTreeView(parent) { mModel = new QFileSystemModel; setModel(mModel); setRootIndex(mModel->setRootPath(QStandardPaths::standardLocations(QStandardPaths::HomeLocation).first())); mModel->setNameFilters(QStringList()<<"*.estel"); mModel->setNameFilterDisables(false); hideColumn(1); hideColumn(2); hideColumn(3); connect(this,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(onDoubleClicked(QModelIndex))); }
CListViewIrcUsers::CListViewIrcUsers(QWidget* parent) : QListView(parent) { d.menuFactory = 0; d.userModel = new IrcUserListModel(); connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(onDoubleClicked(QModelIndex))); }
BleMainWindow::BleMainWindow(QWidget *parent) : QMainWindow(parent), ThemedWidgetBase(this), ui(new Ui::BleMainWindow) , m_maxBtn(false) , m_skinWidget(0) , m_encoderThread(NULL) , m_sendThread(NULL) , m_imageProcessThread(NULL) , m_audioCaptureThread(NULL) , m_sceneWidget(NULL) { ui->setupUi(this); // set image ui->addCameraBtn->setPixmap(QPixmap(":/image/add_camera.png")); ui->addWindowGrabBtn->setPixmap(QPixmap(":/image/add_grab.png")); ui->addPicBtn->setPixmap(QPixmap(":/image/add_pic.png")); ui->startBtn->setPixmap(QPixmap(":/image/ble_start.png")); ui->stopBtn->setPixmap(QPixmap(":/image/ble_stop.png")); ui->addFileSourceBtn->setPixmap(QPixmap(":/image/add_file.png")); ui->add_media->setPixmap(QPixmap(":/image/ble_media.png")); ui->addCameraBtn->setFixedHeight(48); ui->addWindowGrabBtn->setFixedHeight(48); ui->addPicBtn->setFixedHeight(48); ui->startBtn->setFixedHeight(48); ui->stopBtn->setFixedHeight(48); ui->addFileSourceBtn->setFixedHeight(48); ui->add_media->setFixedHeight(48); ui->addTextBtn->setFixedHeight(48); ui->addCameraBtn->setToolTip(tr("add a camera source")); ui->addWindowGrabBtn->setToolTip(tr("add a desktop grab source")); ui->addPicBtn->setToolTip(tr("add a picture source")); ui->addFileSourceBtn->setToolTip(tr("add a file source")); ui->addTextBtn->setToolTip(tr("add text source")); ui->add_media->setToolTip(tr("add media url")); ui->startBtn->setToolTip(tr("begin rtmp streaming")); ui->stopBtn->setToolTip(tr("stop rtmp streaming")); // TODO temp set false ui->addTextBtn->setVisible(false); ui->titleWidget->setFixedHeight(32); ui->titleWidget->setTitle(BLE_TITLE); ui->titleWidget->setHints(TitleWidget::Min_HINT | TitleWidget::CLOSE_HINT | TitleWidget::SKIN_HINT | TitleWidget::MENU_HINT); framelessHelper = new NcFramelessHelper; framelessHelper->setWidgetMovable(true); framelessHelper->setWidgetResizable(true); framelessHelper->activateOn(this); connect(ui->titleWidget->button(TitleWidget::MAX_HINT), SIGNAL(clicked()), this, SLOT(onMax())); connect(ui->titleWidget->button(TitleWidget::Min_HINT), SIGNAL(clicked()), this, SLOT(onMin())); connect(ui->titleWidget->button(TitleWidget::CLOSE_HINT), SIGNAL(clicked()), this, SLOT(onClose())); connect(ui->titleWidget->button(TitleWidget::SKIN_HINT), SIGNAL(clicked()), this, SLOT(onSkin())); connect(ui->titleWidget->button(TitleWidget::MENU_HINT), SIGNAL(clicked()), this, SLOT(onMenu())); connect(ui->titleWidget, SIGNAL(doubleClicked()), this, SLOT(onDoubleClicked())); connect(ui->TabBar,SIGNAL(currentChanged(int)), this,SLOT(onTabBarCurrentChanged(int))); connect(ui->startBtn, SIGNAL(clicked()), this, SLOT(onEncodeStart())); connect(ui->stopBtn, SIGNAL(clicked()), this, SLOT(onEncodeStop())); connect(ui->addCameraBtn, SIGNAL(clicked()) , this, SLOT(onAddCamera())); connect(ui->addWindowGrabBtn, SIGNAL(clicked()) , this, SLOT(onAddWindowGrab())); connect(ui->addPicBtn, SIGNAL(clicked()) , this, SLOT(onAddPic())); connect(ui->addFileSourceBtn, SIGNAL(clicked()) , this, SLOT(onAddFileSource())); connect(ui->addTextBtn, SIGNAL(clicked()) , this, SLOT(onAddTextSource())); connect(ui->add_media, SIGNAL(clicked()) , this, SLOT(onAddMedia())); // tray setting m_systemTrayIcon = new QSystemTrayIcon(QIcon(":/image/logo.png"), this); connect(m_systemTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(activated(QSystemTrayIcon::ActivationReason))); m_systemTrayIcon->show(); // m_imageProcessWidget = new BleImageProcess(this); // add scene widget m_sceneWidget = new BleSceneWidget(this); //m_sceneWidget->addWidget(m_imageProcessWidget); addTabWidget(m_sceneWidget, QPixmap(":/image/ble_live.png"), tr("live")); //BleImageDisplayArea *displayArea = new BleImageDisplayArea(this); //displayArea->addWidget(m_imageProcessWidget); BleSetting *settings = new BleSetting(this); addTabWidget(settings, QPixmap(":/image/ble_setting.png"), tr("Settings")); ui->TabBar->setVisible(false); // connect(settings, SIGNAL(settingChanged()) // , m_imageProcessWidget, SLOT(onSettingChanged())); #ifdef Q_OS_WIN QtWin::enableBlurBehindWindow(this); #endif setWindowTitle(BLE_TITLE); QString versionStr = QString(tr(" version: %1")).arg(BLE_VERSION_STR); ui->statusBar->addWidget(new QLabel(versionStr)); m_statusLabel = new QLabel(this); ui->statusBar->addWidget(m_statusLabel); // ui->TabBar->setVisible(false); settingChanged(); }
void QFieldContainerView::fillTable(const FieldContainerPtr &pFC, UInt32 uiAspect) { UInt32 uiNumFields = pFC->getType().getNumFieldDescs(); _pTable->setNumRows(uiNumFields); for(UInt32 i = 0; i < uiNumFields; ++i) { if(pFC->getField(i+1)->getCardinality() == FieldType::SINGLE_FIELD) { QSFieldView *pSFView = new QSFieldView(pFC, i+1, uiAspect, this); _pTable->setCellWidget(i, ValueColumn, pSFView ); #if (QT_VERSION < 0x030301) || (QT_VERSION < 304) _pTable->setItem (i, ValueColumn, new QWidgetTableItem(_pTable)); #endif connect(pSFView, SIGNAL(clicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState)), this, SLOT (onClicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState))); connect(pSFView, SIGNAL(doubleClicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState)), this, SLOT (onDoubleClicked(FieldContainerPtr, UInt32, UInt32, Qt::ButtonState))); _pTable->setText(i, NameColumn, pFC->getType().getFieldDescription(i+1)->getCName()); } else { QMFieldView *pMFView = new QMFieldView(pFC, i+1, uiAspect, this); _pTable->setCellWidget(i, ValueColumn, pMFView ); #if (QT_VERSION < 0x030302) || (QT_VERSION < 304) _pTable->setItem (i, ValueColumn, new QWidgetTableItem(_pTable)); #endif connect(pMFView, SIGNAL(clicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState)), this, SLOT (onClicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState))); connect(pMFView, SIGNAL(doubleClicked (FieldContainerPtr, UInt32, UInt32, Qt::ButtonState)), this, SLOT (onDoubleClicked(FieldContainerPtr, UInt32, UInt32, Qt::ButtonState))); QString s(pFC->getType().getFieldDescription(i+1)->getCName()); if(pMFView->getFieldPtr()->getSize() >= 2) { s += "\n"; QString num; num.setNum(pMFView->getFieldPtr()->getSize()); s += num; } _pTable->setText(i, NameColumn, s); } _pTable->setText(i, TypeColumn, pFC->getField(i+1)->getType().getCName()); } for(UInt32 i=0; i<uiNumFields; ++i) _pTable->adjustRow(i); _pTable->adjustColumn(NameColumn ); _pTable->adjustColumn(ValueColumn); if(_bShowTypeColumn) { _pTable->showColumn (TypeColumn); _pTable->adjustColumn(TypeColumn); } else { _pTable->hideColumn(TypeColumn); } }