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

parley

  • sources
  • kde-4.12
  • 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 namespace Editor {
32  class VocabularyFilter;
33  class WordTypeModel;
34 
45 class SummaryWordWidget : public QWidget, public Ui::SummaryWordWidget
46 {
47  Q_OBJECT
48 
49 public:
50  SummaryWordWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent = 0);
51 
52 public slots:
56  void setTranslation(KEduVocExpression *entry, int translation);
57 
61  void slotDocumentChanged(KEduVocDocument *doc);
62 
66  void slotSelectionChanged(const QItemSelection &, const QItemSelection &);
67 
68  void wordTypeSelected(const QString& wordTypeName);
69 
70 private:
74  void clear();
75 
84  void setCurrentWordType(KEduVocExpression *entry, int translation);
85 
86 private:
87  VocabularyFilter *m_model;
88  KEduVocDocument *m_doc;
89  QDataWidgetMapper *m_mapper;
90  WordTypeModel *m_wordTypeModel;
91  QTreeView *m_wordTypeView;
92  KEduVocExpression *m_entry;
93  int m_translationId;
94 };
95 
96 class SummaryWordDelegate : public QItemDelegate
97 {
98  Q_OBJECT
99 public:
100  SummaryWordDelegate(QObject *parent = 0);
101 
102  void setEditorData(QWidget *editor, const QModelIndex &index) const;
103 };
104 }
105 
106 #endif
QWidget
Editor::SummaryWordWidget::wordTypeSelected
void wordTypeSelected(const QString &wordTypeName)
Definition: summarywordwidget.cpp:213
QObject
Editor::SummaryWordWidget::SummaryWordWidget
SummaryWordWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent=0)
Definition: summarywordwidget.cpp:41
Editor::VocabularyFilter
Definition: vocabularyfilter.h:27
QTreeView
Editor::SummaryWordWidget::setTranslation
void setTranslation(KEduVocExpression *entry, int translation)
Sets the selected word (KEduVocExpression) from the vocabularyView.
Definition: summarywordwidget.cpp:63
Editor::SummaryWordDelegate
Definition: summarywordwidget.h:96
Editor::SummaryWordDelegate::SummaryWordDelegate
SummaryWordDelegate(QObject *parent=0)
Definition: summarywordwidget.cpp:183
QItemDelegate
Editor::SummaryWordDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: summarywordwidget.cpp:187
Editor::SummaryWordWidget::slotDocumentChanged
void slotDocumentChanged(KEduVocDocument *doc)
Called when a KEduVocDocument change happened.
Definition: summarywordwidget.cpp:94
Editor::SummaryWordWidget::slotSelectionChanged
void slotSelectionChanged(const QItemSelection &, const QItemSelection &)
Called when the selection changed in the vocabulary view.
Definition: summarywordwidget.cpp:121
Editor::WordTypeModel
Model for the tree of word types.
Definition: wordtypemodel.h:25
Editor::SummaryWordWidget
Represents the overview of a KEduVocExpression Shows the language word the lesson the word type pronu...
Definition: summarywordwidget.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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