void VimScrollBar::setLength(int len) { if ( len != m_length ) { m_length = len; emit indexChanged(m_index); // FIXME } }
void KPrViewModeSlidesSorter::activate(KoPAViewMode *previousViewMode) { Q_UNUSED(previousViewMode); KoPAView *view = dynamic_cast<KoPAView *>(m_view); if (view) { view->replaceCentralWidget(m_centralWidget); } m_slidesSorterView->setFocus(Qt::ActiveWindowFocusReason); updateToActivePageIndex(); //setup signals connect(m_slidesSorterView,SIGNAL(indexChanged(QModelIndex)), this, SLOT(itemClicked(QModelIndex))); connect(m_slidesSorterView, SIGNAL(pressed(QModelIndex)), this, SLOT(itemClicked(QModelIndex))); connect(m_view->proxyObject, SIGNAL(activePageChanged()), this, SLOT(updateToActivePageIndex())); //change zoom saving slot connect(m_view->zoomController(), SIGNAL(zoomChanged(KoZoomMode::Mode,qreal)), this, SLOT(updateZoom(KoZoomMode::Mode,qreal))); KPrView *kPrview = dynamic_cast<KPrView *>(m_view); if (kPrview) { disconnect(kPrview->zoomController(), SIGNAL(zoomChanged(KoZoomMode::Mode,qreal)), kPrview, SLOT(zoomChanged(KoZoomMode::Mode,qreal))); m_view->zoomController()->zoomAction()->setZoomModes(KoZoomMode::ZOOM_CONSTANT); loadZoomConfig(); disconnect(kPrview->deleteSelectionAction(), SIGNAL(triggered()), kPrview, SLOT(editDeleteSelection())); connect(kPrview->deleteSelectionAction(), SIGNAL(triggered()), this, SLOT(deleteSlide())); } }
void QUndoStack::clear() { Q_D(QUndoStack); if (d->command_list.isEmpty()) return; bool was_clean = isClean(); d->macro_stack.clear(); qDeleteAll(d->command_list); d->command_list.clear(); d->index = 0; d->clean_index = 0; emit indexChanged(0); emit canUndoChanged(false); emit undoTextChanged(QString()); emit canRedoChanged(false); emit redoTextChanged(QString()); if (!was_clean) emit cleanChanged(true); }
void KUndo2QStack::setIndex(int idx, bool clean) { bool was_clean = m_index == m_clean_index; if (m_lastMergedIndex <= idx) { m_lastMergedSetCount = idx - m_lastMergedIndex; } else { m_lastMergedSetCount = 1; m_lastMergedIndex = idx-1; } if(idx == 0){ m_lastMergedSetCount = 0; m_lastMergedIndex = 0; } if (idx != m_index) { m_index = idx; emit indexChanged(m_index); emit canUndoChanged(canUndo()); emit undoTextChanged(undoText()); emit canRedoChanged(canRedo()); emit redoTextChanged(redoText()); } if (clean) m_clean_index = m_index; bool is_clean = m_index == m_clean_index; if (is_clean != was_clean) emit cleanChanged(is_clean); }
void Line::dispatchEvents() { if (m_index != m_old_index) { m_old_index = m_index; emit indexChanged(); } if (!m_changed) { return; } for (int i = 0; i < m_style_list.size(); i++) { const TextStyleLine current_style = m_style_list.at(i); if (!current_style.changed) continue; if (current_style.changed) { if (current_style.text_segment == 0) { m_style_list[i].text_segment = createTextSegment(current_style); } m_style_list[i].text_segment->setStringSegment(current_style.start_index, current_style.end_index); m_style_list[i].text_segment->setTextStyle(current_style); m_style_list[i].changed = false; m_style_list.at(i).text_segment->dispatchEvents(); } } m_changed = false; }
JDMainWin::JDMainWin(const QString &name, const QString &jid, int acc, QWidget *p) : QDialog(p, Qt::Window) , model_(0) , commands_(0) , refreshInProgres_(false) , yourJid_(name) { setAttribute(Qt::WA_DeleteOnClose); ui_.setupUi(this); setWindowTitle(tr("Jabber Disk - %1").arg(name)); model_ = new JDModel(jid, this); ui_.lv_disk->setModel(model_); commands_ = new JDCommands(acc, jid, this); ui_.pb_send->setShortcut(QKeySequence("Ctrl+Return")); connect(commands_, SIGNAL(incomingMessage(QString,JDCommands::Command)), SLOT(incomingMessage(QString,JDCommands::Command))); connect(commands_, SIGNAL(outgoingMessage(QString)), SLOT(outgoingMessage(QString))); connect(ui_.pb_refresh, SIGNAL(clicked()), SLOT(refresh())); connect(ui_.pb_send, SIGNAL(clicked()), SLOT(doSend())); connect(ui_.pb_clear, SIGNAL(clicked()), SLOT(clearLog())); connect(ui_.lv_disk, SIGNAL(newIndex(QModelIndex)), SLOT(indexChanged(QModelIndex))); connect(ui_.lv_disk, SIGNAL(contextMenu(QModelIndex)), SLOT(indexContextMenu(QModelIndex))); connect(model_, SIGNAL(moveItem(QString,QString)), SLOT(moveItem(QString,QString))); show(); QTimer::singleShot(0, this, SLOT(refresh())); }
void QQuickStack::setIndex(int index) { if (m_index != index) { m_index = index; emit indexChanged(); } }
void VimScrollBar::setIndex(int idx) { if ( idx != m_index ) { m_index = idx; emit indexChanged(m_index); } }
void STVariable::setIndex(int newIndex) { if (index_ != newIndex && newIndex >= 0) { index_ = newIndex; emit indexChanged(index_); } }
void LanguageItem::setIndex(int index) { if (index == m_index) return; m_index = index; emit indexChanged(); }
void SqlItemView::toNext() { int row = findUp(m_row); if (row != m_row) { setCurrentIndex(row, m_column); emit indexChanged(); } }
void SqlItemView::toPrevious() { int row = findDown(m_row); if (row != m_row) { setCurrentIndex(row, m_column); emit indexChanged(); } }
void AudioDevice::setIndex(uint index) { if (m_index == index) return; m_index = index; emit indexChanged(index); }
void SqlItemView::toLast() { int row = findDown(m_model->rowCount()); if (row != m_row) { setCurrentIndex(row, m_column); emit indexChanged(); } }
bool SqlItemView::rowDeleted() { int row = findUp(m_row); if (row != m_row) { setCurrentIndex(row, m_column); emit indexChanged(); return false; } row = findDown(m_row); if (row != m_row) { setCurrentIndex(row, m_column); emit indexChanged(); return false; } return true; }
void Theme::setIndex(int index) { if (index == m_index) { return; } int boundIndex = qBound(0, index, m_displays.size() - 1); m_index = boundIndex; calculate(); Q_EMIT indexChanged(); }
QString AnimatorType::_makeSelection(){ Carta::State::ObjectManager* objManager = Carta::State::ObjectManager::objectManager(); if ( m_select != nullptr ){ objManager->destroyObject( m_select->getId()); } m_select = objManager->createObject<Selection>(); connect( m_select, SIGNAL(indexChanged()), this, SLOT(_selectionChanged())); QString path = m_select->getPath(); return path; }
NewNodeDialog::NewNodeDialog(QModelIndex &index, int row, QWidget *parent, Qt::WindowFlags flags) : QFrame(parent, flags) { this->index = index; this->row = row; baselayout = new QVBoxLayout; namelayout = new QFormLayout; nameedit = new KLineEdit(i18n("Nodename")); nameedit->setClearButtonShown(true); nameedit->selectAll(); connect(nameedit, SIGNAL(returnPressed()), this, SLOT(accept())); namelayout->addRow(i18n("Node name:"), nameedit); baselayout->addLayout(namelayout); // Type & highlighting typelayout = new QGridLayout; lbltype = new QLabel(i18n("Type")); typelayout->addWidget(lbltype, 0, 0); typebox = new KComboBox; typebox->addItem(i18n("RichText")); typebox->addItem(i18n("Text")); typebox->addItem(i18n("Book")); typebox->addItems(Controller::create()->getDataStore()->getCustomNodeTypeNames()); connect(typebox, SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int))); typelayout->addWidget(typebox, 0, 1); syntaxbox = new SyntaxBox; typelayout->addWidget(syntaxbox, 0, 2, 1, 2); baselayout->addLayout(typelayout); indexChanged(typebox->currentIndex()); // Labels labelwidget = new LabelWidget; baselayout->addWidget(labelwidget); // buttons buttonlayout = new QGridLayout; btnCancel = new QPushButton(i18n("Cancel")); btnCancel->setMinimumWidth(100); buttonlayout->addWidget(btnCancel, 0, 0, 1, 1, Qt::AlignLeft); connect(btnCancel, SIGNAL(clicked()), this, SLOT(cancel())); btnOk = new QPushButton(i18n("OK")); btnOk->setMinimumWidth(100); btnOk->setDefault(true); connect(btnOk, SIGNAL(clicked()), this, SLOT(accept())); buttonlayout->addWidget(btnOk, 0, 1, 1, 1, Qt::AlignRight); baselayout->addLayout(buttonlayout); setLayout(baselayout); }
void KListWidget::setSelectIndex( int i ) { Q_D(KListWidget); if(i < 0 || i >= d->m_model->count()) return; if(d->m_indexSelect == i) return; d->m_indexSelect = i; d->updateLayout(); emit indexChanged(i); }
void PSMoveQt::setIndex(int index) { if (_index != index) { _index = index; PSMove *old = _move; _move = psmove_connect_by_id(_index); psmove_disconnect(old); emit indexChanged(); } }
void KateProject::loadIndexDone (KateProjectSharedProjectIndex projectIndex) { /** * move to our project */ m_projectIndex = projectIndex; /** * notify external world that data is available */ emit indexChanged (); }
void KTreeWidget::setSelectNode( qint64 id ) { Q_D(KTreeWidget); if(!d->m_itemsTree.contains(id)) return; if(id == d->m_nodeIdSelect) return; d->m_nodeIdSelect = id; d->updateLayout(); emit indexChanged(id); }
void CommitWidget::setRepository(Git::Repo *repo) { if (m_repo) { m_repo->disconnect(this); } m_repo = repo; connect(m_repo, SIGNAL(indexChanged()), this, SLOT(on_Repo_indexChanged())); clear(); reload(); }
/** * Called from window close of Icon Editors */ /*public*/ /*static*/ bool ImageIndexEditor::checkImageIndex() { if (_indexChanged) { int result = JOptionPane::showConfirmDialog(NULL, tr("Do you want to want to save these changes?\nSelect \"No\" and no further messages will be posted."),tr("Question"), JOptionPane::YES_NO_CANCEL_OPTION, JOptionPane::QUESTION_MESSAGE); if (result == JOptionPane::YES_OPTION) { storeImageIndex(); return true; } else if (result == JOptionPane::NO_OPTION) { indexChanged(false); } } return false; }
KoResourcePopupAction::KoResourcePopupAction(QSharedPointer<KoAbstractResourceServerAdapter>resourceAdapter, QObject *parent) : KAction(parent) , d(new Private()) { Q_ASSERT(resourceAdapter); d->menu = new QMenu(); QWidget *widget = new QWidget(d->menu); QWidgetAction *wdgAction = new QWidgetAction(widget); d->resourceList = new KoResourceItemView(widget); d->resourceList->setModel(new KoResourceModel(resourceAdapter, widget)); d->resourceList->setItemDelegate(new KoResourceItemDelegate(widget)); KoResourceModel * resourceModel = qobject_cast<KoResourceModel*>(d->resourceList->model()); if (resourceModel) { resourceModel->setColumnCount(1); } KoResource *resource = 0; if (resourceAdapter->resources().count() > 0) { resource = resourceAdapter->resources().at(0); } KoAbstractGradient *gradient = dynamic_cast<KoAbstractGradient*>(resource); KoPattern *pattern = dynamic_cast<KoPattern*>(resource); if (gradient) { QGradient *qg = gradient->toQGradient(); qg->setCoordinateMode(QGradient::ObjectBoundingMode); d->background = QSharedPointer<KoShapeBackground>(new KoGradientBackground(qg)); } else if (pattern) { KoImageCollection *collection = new KoImageCollection(); d->background = QSharedPointer<KoShapeBackground>(new KoPatternBackground(collection)); static_cast<KoPatternBackground*>(d->background.data())->setPattern(pattern->pattern()); } QHBoxLayout *layout = new QHBoxLayout(widget); layout->addWidget(d->resourceList); widget->setLayout(layout); wdgAction->setDefaultWidget(widget); d->menu->addAction(wdgAction); setMenu(d->menu); new QHBoxLayout(d->menu); d->menu->layout()->addWidget(widget); d->menu->layout()->setMargin(0); connect(d->resourceList, SIGNAL(clicked(QModelIndex)), this, SLOT(indexChanged(QModelIndex))); updateIcon(); }
void FTabWidget::setButtonChecked() { for (int i = 0; i < buttons.size(); ++i) { if (buttons.at(i) == sender()) { buttons.at(i)->setChecked(true); stackLayout->setCurrentIndex(i); emit indexChanged(i); } else{ buttons.at(i)->setChecked(false); } } }
void FNavgationBar::setButtonChecked() { for (int i = 0; i < buttons.size(); ++i) { if (buttons.at(i) == sender()) { buttons.at(i)->setChecked(true); emit indexChanged(i); cIndex = i; } else{ buttons.at(i)->setChecked(false); } } }
/*public*/ /*static*/ void ImageIndexEditor::storeImageIndex() // SLOT[] { Logger* log = new Logger("ImageIndexEditor"); ItemPalette::storeIcons(); if (log->isDebugEnabled()) log->debug("Start writing CatalogTree info"); try { //new DefaultCatalogTreeManagerXml()::writeCatalogTrees(); DefaultCatalogTreeManagerXml* xml = new DefaultCatalogTreeManagerXml(); xml->writeCatalogTrees(); indexChanged(false); } //catch (org.jdom.JDOMException jde) { log->error("Exception writing CatalogTrees: "+jde); } catch (IOException ioe) { log->error("Exception writing CatalogTrees: "+ioe.getMessage()); } }
PluginDialog::PluginDialog() { #ifdef Q_WS_WIN os = "windows"; #endif #ifdef Q_WS_X11 os = "X11"; #endif setWindowIcon(QIcon(":/plug.png")); listWidget = new QTreeWidget(this); listWidget->setIconSize(QSize(24, 24)); listWidget->header()->hide(); info = new QPushButton(tr("plus d'info")); installButton = new QPushButton(tr("Installer")); line = new QLineEdit; line->setPlaceholderText(tr("Rechercher")); connect(info, SIGNAL(clicked()), this, SLOT(getInfo())); connect(installButton, SIGNAL(clicked()), this, SLOT(installPlugin())); connect(listWidget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(indexChanged())); connect(line, SIGNAL(textChanged(QString)), this, SLOT(search())); QVBoxLayout *lay = new QVBoxLayout; QHBoxLayout *hLay = new QHBoxLayout; lay->addWidget(listWidget); hLay->addStretch(); hLay->addWidget(info); hLay->addWidget(line); hLay->addWidget(installButton); lay->addLayout(hLay); hLay->setStretchFactor(line, 100); setLayout(lay); QSettings set(qApp->applicationDirPath() + "/pluginsList.ini", QSettings::IniFormat); set.beginGroup(os); QStringList items = set.value("list").toStringList(); set.endGroup(); fillTree(items); indexChanged(); resize(500, 400); }
void SqlItemView::aApp_focusChanged(QWidget* old, QWidget* now) { if (m_model) { for (int i = 0; i < m_count; ++i) { QWidget * w = m_gridLayout->itemAtPosition(i, 1)->widget(); if (w == now) { m_column = i; setCurrentIndex(m_row, m_column); emit indexChanged(); break; } } } }