• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • editor
summarywordwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
4  Copyright 2008 Javier Goday <jgoday@gmail.com>
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef SUMMARYWORDWIDGET_H
16 #define SUMMARYWORDWIDGET_H
17 
18 #include "ui_summarywordwidget.h"
19 
20 #include <QItemDelegate>
21 #include <QWidget>
22 
23 class QTreeView;
24 class QDataWidgetMapper;
25 class QItemSelection;
26 class QModelIndex;
27 class KEduVocContainer;
28 class KEduVocDocument;
29 class KEduVocExpression;
30 
31 class VocabularyFilter;
32 class WordClassModel;
33 
34 namespace Editor
35 {
36 
47 class SummaryWordWidget : public QWidget, public Ui::SummaryWordWidget
48 {
49  Q_OBJECT
50 
51 public:
52  SummaryWordWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent = 0);
53 
54 public slots:
58  void setTranslation(KEduVocExpression *entry, int translation);
59 
63  void slotDocumentChanged(KEduVocDocument *doc);
64 
68  void slotSelectionChanged(const QItemSelection &, const QItemSelection &);
69 
70  void wordTypeSelected(const QString& wordTypeName);
71 
72 private:
76  void clear();
77 
86  void setCurrentWordType(KEduVocExpression *entry, int translation);
87 
88 private:
89  VocabularyFilter *m_model;
90  KEduVocDocument *m_doc;
91  QDataWidgetMapper *m_mapper;
92  WordClassModel *m_wordTypeModel;
93  QTreeView *m_wordTypeView;
94  KEduVocExpression *m_entry;
95  int m_translationId;
96 };
97 
98 class SummaryWordDelegate : public QItemDelegate
99 {
100  Q_OBJECT
101 public:
102  SummaryWordDelegate(QObject *parent = 0);
103 
104  void setEditorData(QWidget *editor, const QModelIndex &index) const;
105 };
106 }
107 
108 #endif
QModelIndex
QWidget
WordClassModel
Model for the tree of word types.
Definition: wordclassmodel.h:24
VocabularyFilter
Definition: vocabularyfilter.h:26
Editor::SummaryWordWidget::wordTypeSelected
void wordTypeSelected(const QString &wordTypeName)
Definition: summarywordwidget.cpp:218
Editor::SummaryWordWidget::SummaryWordWidget
SummaryWordWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent=0)
Definition: summarywordwidget.cpp:46
QObject
QDataWidgetMapper
QItemDelegate
QString
Editor::SummaryWordWidget::setTranslation
void setTranslation(KEduVocExpression *entry, int translation)
Sets the selected word (KEduVocExpression) from the vocabularyView.
Definition: summarywordwidget.cpp:68
Editor::SummaryWordDelegate
Definition: summarywordwidget.h:98
QItemSelection
Editor::SummaryWordDelegate::SummaryWordDelegate
SummaryWordDelegate(QObject *parent=0)
Definition: summarywordwidget.cpp:188
QTreeView
Editor::SummaryWordDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: summarywordwidget.cpp:192
Editor::SummaryWordWidget::slotDocumentChanged
void slotDocumentChanged(KEduVocDocument *doc)
Called when a KEduVocDocument change happened.
Definition: summarywordwidget.cpp:99
Editor::SummaryWordWidget::slotSelectionChanged
void slotSelectionChanged(const QItemSelection &, const QItemSelection &)
Called when the selection changed in the vocabulary view.
Definition: summarywordwidget.cpp:126
QObject::parent
QObject * parent() const
Editor::SummaryWordWidget
Represents the overview of a KEduVocExpression Shows the language word the lesson the word type pronu...
Definition: summarywordwidget.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal