void kClipHolder::btnClicked(widgetEvent & _event ){ int index = btnView->value; string command = btnView->labels[index]; if( command == "select" ) notify("select"); if( command == "connect" ) notify("connect"); if( command == "related" ) { addView(); showView(btnView->widgets[ index ]->x,btnView->widgets[ index ]->y); } if( command == "scenes" ) { addView(); showView(btnView->widgets[ index ]->x,btnView->widgets[ index ]->y); } if( command == "tags" ) { addView(); showView(btnView->widgets[ index ]->x,btnView->widgets[ index ]->y); } }
void StandardPLPanel::cycleViews() { if( currentView == iconView ) showView( TREE_VIEW ); else if( currentView == treeView ) showView( LIST_VIEW ); else if( currentView == listView ) showView( ICON_VIEW ); else assert( 0 ); }
void StandardPLPanel::cycleViews() { if( currentView == iconView ) showView( TREE_VIEW ); else if( currentView == treeView ) showView( LIST_VIEW ); else if( currentView == listView ) #ifndef NDEBUG showView( PICTUREFLOW_VIEW ); else if( currentView == picFlowView ) #endif showView( ICON_VIEW ); else assert( 0 ); }
PgConsole::PgConsole() { this->setCaption("SQL console"); this->setGeometry(100,100,640,480); this->setFontPointSize(12); QObject::connect(this, SIGNAL(sqlcmd(QString)), this, SLOT(showView(QString))); }
TEST(chatpresenter, test_incomingMessages) { Poco::SharedPtr<MockChatService> m(new MockChatService); Mvp::Presenter::TextChatPresenter presenter(m.get()); Poco::SharedPtr<MockChatView> v(new MockChatView()); EXPECT_CALL(*v, initialize()); ON_CALL(*m, getParticipants()) .WillByDefault(Return(contacts)); ON_CALL(*m, messageHistory(_)) .WillByDefault(Return(messages)); EXPECT_CALL(*m, chatName()); EXPECT_CALL(*v, setChatTitle(_)); EXPECT_CALL(*m, messageHistory(_)); EXPECT_CALL(*m, isConsumer()); EXPECT_CALL(*v, enableControls(_)); EXPECT_CALL(*v, showLeaveAction(_)); EXPECT_CALL(*m, getParticipants()); EXPECT_CALL(*v, setParticipants(_)); presenter.setView(v.get()); EXPECT_CALL(*v, showView()); presenter.showView(); EXPECT_CALL(*v, addMessage(_)); m->triggerIncomingMessage(); }
void Browser::showSongs(const QVariant &containerId, const QString &title) { #ifdef Q_WS_MAEMO_5 SongView *songView = new SongView(gallery); #endif showView(songView, containerId, title); }
void Browser::showPhotos(const QVariant &containerId, const QString &title) { #ifdef Q_WS_MAEMO_5 PhotoView *photoView = new PhotoView(gallery); #endif showView(photoView, containerId, title); }
void KOViewManager::showListView() { if(!mListView) { mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); addView(mListView); } showView(mListView); }
GameWindow::GameWindow(QWidget *parent) : QStackedWidget(parent) { menu = new GameMenu; view = new GameView; this->addWidget(view); this->addWidget(menu); connect(menu, SIGNAL(startClicked()), this, SLOT(showView())); }
void KOViewManager::showTimeSpentView() { if ( !mTimeSpentView ) { mTimeSpentView = new KOTimeSpentView( mMainView->calendar(), mMainView->viewStack() ); mTimeSpentView->setObjectName( "KOViewManager::TimeSpentView" ); addView( mTimeSpentView ); } goMenu( true ); showView( mTimeSpentView ); }
void KOViewManager::showMonthView() { if ( !mMonthView ) { mMonthView = new KOrg::MonthView( mMainView->calendar(), mMainView->viewStack() ); mMonthView->setObjectName( "KOViewManager::MonthView" ); addView( mMonthView ); } goMenu( true ); showView( mMonthView ); }
void KOViewManager::showWhatsNextView() { if ( !mWhatsNextView ) { mWhatsNextView = new KOWhatsNextView( mMainView->calendar(), mMainView->viewStack() ); mWhatsNextView->setObjectName( "KOViewManager::WhatsNextView" ); addView( mWhatsNextView ); } goMenu( true ); showView( mWhatsNextView ); }
void Browser::showAlbums(const QVariant &containerId, const QString &title) { #ifdef Q_WS_MAEMO_5 AlbumView *albumView = new AlbumView(gallery); connect(albumView, SIGNAL(showSongs(QVariant,QString)), this, SLOT(showSongs(QVariant,QString))); #endif showView(albumView, containerId, title); }
void KOViewManager::showWhatsNextView() { if(!mWhatsNextView) { mWhatsNextView = new KOWhatsNextView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::WhatsNextView"); addView(mWhatsNextView); } showView(mWhatsNextView); }
void KOViewManager::showListView() { if ( !mListView ) { mListView = new KOListView( mMainView->calendar(), mMainView->viewStack() ); mListView->setObjectName( "KOViewManager::ListView" ); addView( mListView ); } goMenu( true ); showView( mListView ); }
bool CharmWindow::showHideView( QWidget* w ) { // hide or restore the view if ( w->isVisible() ) { w->hide(); return false; } else { showView( w ); return true; } }
void Dialog::showData(string const & data) { if (isBufferDependent() && !isBufferAvailable()) return; if (!initialiseParams(data)) { LYXERR0("Dialog \"" << name() << "\" failed to translate the data string passed to show()"); return; } showView(); }
void CharmWindow::setWindowNumber( int number ) { m_windowNumber = number; delete m_shortcut; m_shortcut = new QShortcut( this ); QKeySequence sequence( tr( "Ctrl+%1" ).arg( number ) ); #ifdef Q_OS_OSX m_shortcut->setKey( sequence ); #endif m_shortcut->setContext( Qt::ApplicationShortcut ); m_showHideAction->setShortcut( sequence ); m_showAction->setShortcut( sequence ); connect( m_shortcut, SIGNAL(activated()), SLOT(showHideView()) ); connect( m_shortcut, SIGNAL(activated()), SLOT(showView()) ); }
StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, intf_thread_t *_p_intf, playlist_item_t *p_root, PLSelector *_p_selector, VLCModel *_p_model ) : QWidget( _parent ), model( _p_model ), p_intf( _p_intf ), p_selector( _p_selector ) { viewStack = new QStackedLayout( this ); viewStack->setSpacing( 0 ); viewStack->setMargin( 0 ); setMinimumWidth( 300 ); iconView = NULL; treeView = NULL; listView = NULL; picFlowView = NULL; currentRootIndexPLId = -1; lastActivatedPLItemId = -1; QList<QString> frames; frames << ":/util/wait1"; frames << ":/util/wait2"; frames << ":/util/wait3"; frames << ":/util/wait4"; spinnerAnimation = new PixmapAnimator( this, frames ); CONNECT( spinnerAnimation, pixmapReady( const QPixmap & ), this, updateViewport() ); /* Saved Settings */ int i_savedViewMode = getSettings()->value( "Playlist/view-mode", TREE_VIEW ).toInt(); QFont font = QApplication::font(); font.setPointSize( font.pointSize() + getSettings()->value( "Playlist/zoom", 0 ).toInt() ); model->setData( QModelIndex(), font, Qt::FontRole ); showView( i_savedViewMode ); DCONNECT( THEMIM, leafBecameParent( int ), this, browseInto( int ) ); CONNECT( model, currentIndexChanged( const QModelIndex& ), this, handleExpansion( const QModelIndex& ) ); CONNECT( model, rootIndexChanged(), this, browseInto() ); setRootItem( p_root, false ); }
ComponentViewItem::ComponentViewItem(AbstractComponentView* p_item, QWidget* p_parent /*= 0*/ ) : QWidget(p_parent), m_item(p_item) { m_header = new ComponentViewHeader(p_item->GetComponentName(), this); m_layout = new QVBoxLayout(this); m_layout->setContentsMargins(0, 0, 0, 0); m_layout->addWidget(m_header); m_layout->addWidget(p_item); m_layout->setSizeConstraint(QLayout::SetNoConstraint); setLayout(m_layout); m_header->SetArrowShape(p_item->m_shown ? Qt::ArrowType::DownArrow : Qt::ArrowType::RightArrow); connect(m_header, SIGNAL(showView()), this, SLOT(ShowComponentView())); connect(m_header, SIGNAL(hideView()), this, SLOT(HideComponentView())); connect(m_header, SIGNAL(remove()), this, SLOT(RemoveComponent())); }
WinAlarmSummary::WinAlarmSummary(QWidget *parent) : QWidget(parent) { btnPress = -1; btnStatus = false; dataName = "alarm"; detailTime = true; currentRow = 0; initAlarmSummaryUI(); initAlarmSummaryModel(); showView(); signalAndSlotConnect(); }
void PgxConsole::pasteFromClipboard() { if(!textCursor().atEnd()) { if(textCursor().block().next().isValid()) { QTextCursor cursor = textCursor(); cursor.movePosition(QTextCursor::End); setTextCursor(cursor); } } QClipboard *clipboard = QApplication::clipboard(); QString clipboard_text = clipboard->text(); QStringList clipboard_text_list = clipboard_text.trimmed().split("\n", QString::SkipEmptyParts); int clipboard_text_list_size = clipboard_text_list.size(); for(int i = 0; i < clipboard_text_list_size; i++) { insertPlainText(clipboard_text_list.at(i)); if(i != clipboard_text_list_size-1) showView(clipboard_text_list.at(i)); } }
TEST(chatpresenter, test_postingsms) { Poco::SharedPtr<MockChatService> m(new MockChatService); Mvp::Presenter::TextChatPresenter presenter(m.get()); Poco::SharedPtr<MockChatView> v(new MockChatView()); EXPECT_CALL(*v, initialize()); ON_CALL(*m, getParticipants()) .WillByDefault(Return(contacts)); ON_CALL(*m, messageHistory(_)) .WillByDefault(Return(messages)); EXPECT_CALL(*m, chatName()); EXPECT_CALL(*v, setChatTitle(_)); EXPECT_CALL(*m, messageHistory(_)); EXPECT_CALL(*m, isConsumer()); EXPECT_CALL(*v, enableControls(_)); EXPECT_CALL(*v, showLeaveAction(_)); EXPECT_CALL(*m, getParticipants()); EXPECT_CALL(*v, setParticipants(_)); presenter.setView(v.get()); EXPECT_CALL(*v, showView()); presenter.showView(); EXPECT_CALL(*v, setSmsMode(true)); v->triggerToggleMode(); EXPECT_CALL(*m, postSMS(_)); v->triggerPostMessage(); EXPECT_CALL(*v, reportMessageStatus( Mvp::View::AbstractChatView::SmsDelivered, _)); m->triggerSmsDelivered(); EXPECT_CALL(*v, reportMessageStatus( Mvp::View::AbstractChatView::MiscError, _)); m->triggerSmsError(); }
KTextEditor::View *KateViewSpace::createView(KTextEditor::Document *doc) { // should only be called if a view does not yet exist Q_ASSERT(! m_docToView.contains(doc)); /** * Create a fresh view */ KTextEditor::View *v = doc->createView(stack, m_viewManager->mainWindow()->wrapper()); // set status bar to right state v->setStatusBarEnabled(m_viewManager->mainWindow()->showStatusBar()); // restore the config of this view if possible if (!m_group.isEmpty()) { QString fn = v->document()->url().toString(); if (! fn.isEmpty()) { QString vgroup = QString::fromLatin1("%1 %2").arg(m_group).arg(fn); KateSession::Ptr as = KateApp::self()->sessionManager()->activeSession(); if (as->config() && as->config()->hasGroup(vgroup)) { KConfigGroup cg(as->config(), vgroup); v->readSessionConfig(cg); } } } // register document, it is shown below through showView() then if (! m_lruDocList.contains(doc)) { registerDocument(doc); Q_ASSERT(m_lruDocList.contains(doc)); } // insert View into stack stack->addWidget(v); m_docToView[doc] = v; showView(v); return v; }
StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent, intf_thread_t *_p_intf, playlist_item_t *p_root, PLSelector *_p_selector, PLModel *_p_model, MLModel *_p_plmodel) : QWidget( _parent ), model( _p_model ), mlmodel( _p_plmodel), p_intf( _p_intf ), p_selector( _p_selector ) { viewStack = new QStackedLayout( this ); viewStack->setSpacing( 0 ); viewStack->setMargin( 0 ); setMinimumWidth( 300 ); iconView = NULL; treeView = NULL; listView = NULL; picFlowView = NULL; currentRootIndexId = -1; lastActivatedId = -1; /* Saved Settings */ int i_savedViewMode = getSettings()->value( "Playlist/view-mode", TREE_VIEW ).toInt(); i_zoom = getSettings()->value( "Playlist/zoom", 0 ).toInt(); showView( i_savedViewMode ); DCONNECT( THEMIM, leafBecameParent( int ), this, browseInto( int ) ); CONNECT( model, currentIndexChanged( const QModelIndex& ), this, handleExpansion( const QModelIndex& ) ); CONNECT( model, rootIndexChanged(), this, browseInto() ); setRootItem( p_root, false ); }
void TestDbView::openExistedTest() { QString filename(""); if (m_testBox->count() > 0) { QListWidgetItem *item = m_testBox->currentItem(); if (item) { filename = testFolderPath() + item->text(); QFile file(filename); if (file.exists()) { QFileInfo fileExt(filename); QString ext = fileExt.suffix(); if (ext == ".doc" || ext == ".docx") { emit docFileName(filename); } else if (SqlliteDbManager::checkIfTestDb(filename)) { emit bdFileName(filename); } } } } emit showView(CreatorView); }
void AkuViewOptionWidget::loadSettings() { KConfigGroup viewOptionConfig = KGlobal::config()->group("Views Option"); if (!viewOptionConfig.exists()) { viewOptionConfig.writeEntry("Active View", "TreeView"); viewOptionConfig.writeEntry("IconView item size", KIconLoader::global()->currentSize(KIconLoader::Desktop)); } // here we load the active view int view = 0; if (viewOptionConfig.readEntry("Active View", "TreeView") == "IconView") { view = 1; } showView(view); // icon settings m_iconWidget->view()->setIconSize(viewOptionConfig.readEntry("IconView item size", KIconLoader::global()->currentSize(KIconLoader::Desktop) )); ui.iconSizeSlider->setValue(m_iconWidget->view()->iconSize()); }
void SavingSettingsTabView::back() { emit showView(TestStartView); }
/** * Verarbeitet das Touch-Event. */ void handleTouchEvent() { // Prüfung, ob ein Tipp auf den Touchscreen erkannt und dieser noch nicht verarbeitet wurde if (touchEvent.isTap && touchEvent.startTime > lastTapTime) { // Es wurde auf den Touchscreen getippt. Es wird versucht, an der Stelle ein Feld zu // erzeugen. QCAR::Vec3F intersection; // Projektion der Koordinaten, auf die getippt wurde, auf die Ebene des getrackten // Objektes projectScreenPointToPlane(screenWidth, screenHeight, QCAR::Vec2F(touchEvent.tapPosition.data[0], touchEvent.tapPosition.data[1]), inverseProjectionMatrix, modelViewMatrix, QCAR::Vec3F(0, 0, 0), QCAR::Vec3F(0, 0, 1), intersection); // Prüfung, ob sich an den projezierten Koordinaten bereits ein Feld befindet Space* space = selectSpace(QCAR::Vec2F(intersection.data[0], intersection.data[1])); if (space != NULL) { // Feld gefunden // normales Feld in Sonderfeld umwandeln und umgekehrt if (space->type == SPACE) { space->type = SPECIAL_SPACE; } else if (space->type == SPECIAL_SPACE) { space->type = SPACE; } } else if (canCreateSpace(QCAR::Vec2F(intersection.data[0], intersection.data[1]))) { // kein Feld gefunden, es kann ein neues erstellt werden // Feld erzeugen createSpace(QCAR::Vec2F(intersection.data[0], intersection.data[1])); // Weiter-Button beim Erreichen einer bestimmten Anzahl von Feldern anzeigen if (field.length == SPACE_COUNT_TO_SHOW_NEXT_BUTTON) { showView("nextButton"); } // Neustart-Button beim Erreichen einer bestimmten Anzahl von Feldern anzeigen if (field.length == SPACE_COUNT_TO_SHOW_RESTART_BUTTON) { showView("restartButton"); } } // Zeit des Verarbeitung manipulieren, damit dieser Tipp nicht mehr verarbeitet wird lastTapTime = touchEvent.startTime; } else if (touchEvent.isActive) { // Der User hat den Finger immer noch auf dem Touchscreen. Wenn der Finger über den // Bildschrim gezogen wird, dann wird versucht auf diesem Zieh-Pfad nacheinander Felder // zu erzeugen. // Touch-Ereignis ignorieren, wenn daraus noch ein Tipp werden könnte if (touchEvent.lifeTime > MAX_TAP_TIME || touchEvent.startPositionLastPositionDistance > MAX_TAP_SQUARED_DISTANCE) { QCAR::Vec3F intersection; // Projektion der Koordinaten, auf denen sich der Finger befindet, auf die Ebene des // getrackten Objektes projectScreenPointToPlane( screenWidth, screenHeight, QCAR::Vec2F(touchEvent.currentPosition.data[0], touchEvent.currentPosition.data[1]), inverseProjectionMatrix, modelViewMatrix, QCAR::Vec3F(0, 0, 0), QCAR::Vec3F(0, 0, 1), intersection); // Prüfung, ob an den projezierten Koordinaten ein Feld erzeugt werden kann if (canCreateSpace(QCAR::Vec2F(intersection.data[0], intersection.data[1]))) { // Feld erzeugen createSpace(QCAR::Vec2F(intersection.data[0], intersection.data[1])); // Weiter-Button beim Erreichen einer bestimmten Anzahl von Feldern anzeigen if (field.length == SPACE_COUNT_TO_SHOW_NEXT_BUTTON) { showView("nextButton"); } // Neustart-Button beim Erreichen einer bestimmten Anzahl von Feldern anzeigen if (field.length == SPACE_COUNT_TO_SHOW_RESTART_BUTTON) { showView("restartButton"); } } } } }
void ContactsTable::addNewContact(ContactView& view) const { addContactView(view); showView(view); view.addNewContact (); }