Changeset View
Changeset View
Standalone View
Standalone View
src/glossary/glossarywindow.cpp
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 212 | { | |||
---|---|---|---|---|---|
303 | //connect (m_definition,SIGNAL(textChanged()),this,SLOT(applyEntryChange())); | 303 | //connect (m_definition,SIGNAL(textChanged()),this,SLOT(applyEntryChange())); | ||
304 | //connect (m_subjectField,SIGNAL(editTextChanged(QString)),this,SLOT(applyEntryChange())); | 304 | //connect (m_subjectField,SIGNAL(editTextChanged(QString)),this,SLOT(applyEntryChange())); | ||
305 | connect(m_subjectField->lineEdit(), &QLineEdit::editingFinished, this, &GlossaryWindow::applyEntryChange); | 305 | connect(m_subjectField->lineEdit(), &QLineEdit::editingFinished, this, &GlossaryWindow::applyEntryChange); | ||
306 | 306 | | |||
307 | 307 | | |||
308 | //m_subjectField->addItems(Project::instance()->glossary()->subjectFields()); | 308 | //m_subjectField->addItems(Project::instance()->glossary()->subjectFields()); | ||
309 | //m_subjectField->setModel(new SubjectFieldModel(this)); | 309 | //m_subjectField->setModel(new SubjectFieldModel(this)); | ||
310 | QStringList subjectFields = Project::instance()->glossary()->subjectFields(); | 310 | QStringList subjectFields = Project::instance()->glossary()->subjectFields(); | ||
311 | qSort(subjectFields); | 311 | std::sort(subjectFields.begin(), subjectFields.end()); | ||
312 | QStringListModel* subjectFieldsModel = new QStringListModel(this); | 312 | QStringListModel* subjectFieldsModel = new QStringListModel(this); | ||
313 | subjectFieldsModel->setStringList(subjectFields); | 313 | subjectFieldsModel->setStringList(subjectFields); | ||
314 | m_subjectField->setModel(subjectFieldsModel); | 314 | m_subjectField->setModel(subjectFieldsModel); | ||
315 | connect(m_browser, QOverload<int>::of(&GlossaryTreeView::currentChanged), this, &GlossaryWindow::currentChanged); | 315 | connect(m_browser, QOverload<int>::of(&GlossaryTreeView::currentChanged), this, &GlossaryWindow::currentChanged); | ||
316 | connect(m_browser, QOverload<const QByteArray &>::of(&GlossaryTreeView::currentChanged), this, &GlossaryWindow::showEntryInEditor); | 316 | connect(m_browser, QOverload<const QByteArray &>::of(&GlossaryTreeView::currentChanged), this, &GlossaryWindow::showEntryInEditor); | ||
317 | 317 | | |||
318 | connect(m_definitionLang, QOverload<int>::of(&KComboBox::activated), this, &GlossaryWindow::showDefinitionForLang); | 318 | connect(m_definitionLang, QOverload<int>::of(&KComboBox::activated), this, &GlossaryWindow::showDefinitionForLang); | ||
319 | m_definitionLang->setModel(LanguageListModel::emptyLangInstance()->sortModel()); | 319 | m_definitionLang->setModel(LanguageListModel::emptyLangInstance()->sortModel()); | ||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |