void FacilityShadingGridView::filterChanged() { std::set<openstudio::model::ModelObject> allFilteredObjects = m_objectsFilteredByName; for (auto obj : m_objectsFilteredByTilt) { if (allFilteredObjects.count(obj) == 0) { allFilteredObjects.insert(obj); } } for (auto obj : m_objectsFilterdByType) { if (allFilteredObjects.count(obj) == 0) { allFilteredObjects.insert(obj); } } for (auto obj : m_objectsFilteredByOrientation) { if (allFilteredObjects.count(obj) == 0) { allFilteredObjects.insert(obj); } } this->m_gridController->getObjectSelector()->m_filteredObjects = allFilteredObjects; this->m_gridView->requestRefreshAll(); onClearSelection(); }
void AbstractDataView::clearSelection() { if (m_selection.isEmpty()) { return; } m_selection.clear(); onClearSelection(); emit selectionChanged(this, m_selection); }
void RendererImplementation::clearSelection() { if (m_selection.isEmpty()) { return; } m_selection.clear(); onClearSelection(); m_renderView.clearSelection(); }
TEWidget::TEWidget(QWidget *parent) : QFrame(parent) { //input_text_ = new QLabel(); input_text_ = new DS::InputMethodW(0); //input_text_->setGeometry(100,100,400,400); #ifndef QT_NO_CLIPBOARD cb = QApplication::clipboard(); QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) ); #endif setAttribute(Qt::WA_InputMethodEnabled); scrollbar = new QScrollBar(this); scrollbar->setCursor(Qt::ArrowCursor); connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); scrollLoc = SCRRIGHT; blinkT = new QTimer(this); connect(blinkT, SIGNAL(timeout()), this, SLOT(blinkEvent())); // blinking = FALSE; blinking = TRUE; resizing = FALSE; actSel = 0; image = 0; lines = 1; columns = 1; font_w = 1; font_h = 1; font_a = 1; word_selection_mode = FALSE; setMouseMarks(TRUE); //setVTFont( QFont("fixed") ); setColorTable(base_color_table); // init color table qApp->installEventFilter( this ); //FIXME: see below // KCursor::setAutoHideCursor( this, true ); // Init DnD //////////////////////////////////////////////////////////////// currentSession = 0; // setAcceptDrops(true); // attempt // m_drop = new QPopupMenu(this); // m_drop->insertItem( QString("Paste"), 0); // m_drop->insertItem( QString("cd"), 1); // connect(m_drop, SIGNAL(activated(int)), SLOT(drop_menu_activated(int))); // we need focus so that the auto-hide cursor feature works setFocus(); setFocusPolicy( WheelFocus ); }
TopBarWidget::TopBarWidget(MainWidget *w) : TWidget(w) , _a_appearance(animation(this, &TopBarWidget::step_appearance)) , _clearSelection(this, lang(lng_selected_clear), st::topBarClearButton) , _forward(this, lang(lng_selected_forward), st::defaultActiveButton) , _delete(this, lang(lng_selected_delete), st::defaultActiveButton) , _info(this, nullptr, st::infoButton) , _mediaType(this, lang(lng_media_type), st::topBarButton) , _search(this, st::topBarSearch) { _clearSelection->setTextTransform(Ui::RoundButton::TextTransform::ToUpper); _forward->setTextTransform(Ui::RoundButton::TextTransform::ToUpper); _delete->setTextTransform(Ui::RoundButton::TextTransform::ToUpper); connect(_forward, SIGNAL(clicked()), this, SLOT(onForwardSelection())); connect(_delete, SIGNAL(clicked()), this, SLOT(onDeleteSelection())); connect(_clearSelection, SIGNAL(clicked()), this, SLOT(onClearSelection())); connect(_info, SIGNAL(clicked()), this, SLOT(onInfoClicked())); connect(_search, SIGNAL(clicked()), this, SLOT(onSearch())); subscribe(Adaptive::Changed(), [this]() { updateAdaptiveLayout(); }); setCursor(style::cur_pointer); showAll(); }
SpacesInteriorPartitionsGridView::SpacesInteriorPartitionsGridView(bool isIP, const model::Model & model, QWidget * parent) : SpacesSubtabGridView(isIP, model, parent) { showStoryFilter(); showThermalZoneFilter(); showSpaceTypeFilter(); showInteriorPartitionGroupFilter(); m_filterGridLayout->setRowStretch(m_filterGridLayout->rowCount(), 100); m_filterGridLayout->setColumnStretch(m_filterGridLayout->columnCount(), 100); m_gridController = new SpacesInteriorPartitionsGridController(isIP, "Space", IddObjectType::OS_Space, model, m_spacesModelObjects); m_gridView = new OSGridView(m_gridController, "Space", "Drop\nSpace", false, parent); setGridController(m_gridController); setGridView(m_gridView); m_gridView->m_contentLayout->addLayout(m_filterGridLayout); m_gridView->m_contentLayout->addSpacing(7); m_gridView->m_dropZone->hide(); onClearSelection(); }
void OSInspectorView::clearSelection() { onClearSelection(); }
void SubTabController::clearSelection() { onClearSelection(); }
bool TEWidget::eventFilter( QObject *obj, QEvent *e ) { #if 0 // because QT4 using QShortcut, so I diable this function if ( (e->type() == QEvent::Accel || e->type() == QEvent::AccelAvailable ) && qApp->focusWidget() == this ) { static_cast<QKeyEvent *>( e )->ignore(); return true; } #endif if ( obj != this /* when embedded */ && obj != parent() /* when standalone */ ) return FALSE; // not us if ( e->type() == QEvent::Wheel) { QApplication::sendEvent(scrollbar, e); } #ifdef FAKE_CTRL_AND_ALT static bool control = FALSE; static bool alt = FALSE; // Has a keyboard with no CTRL and ALT keys, but we fake it: bool dele=FALSE; if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease ) { QKeyEvent* ke = (QKeyEvent*)e; bool keydown = e->type() == QEvent::KeyPress || ke->isAutoRepeat(); switch (ke->key()) { case Key_F9: // let this be "Control" control = keydown; e = new QKeyEvent(QEvent::KeyPress, Key_Control, 0, ke->state()); dele=TRUE; break; case Key_F13: // let this be "Alt" alt = keydown; e = new QKeyEvent(QEvent::KeyPress, Key_Alt, 0, ke->state()); dele=TRUE; break; default: if ( control ) { int a = toupper(ke->ascii())-64; if ( a >= 0 && a < ' ' ) { e = new QKeyEvent(e->type(), ke->key(), a, ke->state()|ControlButton, QChar(a,0)); dele=TRUE; } } if ( alt ) { e = new QKeyEvent(e->type(), ke->key(), ke->ascii(), ke->state()|AltButton, ke->text()); dele=TRUE; } } } #endif if ( e->type() == QEvent::KeyPress ) { QKeyEvent* ke = (QKeyEvent*)e; actSel=0; // Key stroke implies a screen update, so TEWidget won't // know where the current selection is. emit keyPressedSignal(ke); // expose ke->accept(); #ifdef FAKE_CTRL_AND_ALT if ( dele ) delete e; #endif return true; // stop the event } if ( e->type() == QEvent::Enter ) { QObject::disconnect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) ); } if ( e->type() == QEvent::Leave ) { QObject::connect( (QObject*)cb, SIGNAL(dataChanged()), this, SLOT(onClearSelection()) ); } return QFrame::eventFilter( obj, e ); }