• 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
  • collection
vocabularymimedata.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
4 
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 
16 #ifndef VOCABULARYMIMEDATA_H
17 #define VOCABULARYMIMEDATA_H
18 
19 #include <keduvocexpression.h>
20 #include <keduvocwordtype.h>
21 #include <QMimeData>
22 
23 class KEduVocTranslation;
24 
25 
26 class VocabularyMimeData : public QMimeData
27 {
28  Q_OBJECT
29 public:
30  struct MimeExpression {
31  struct WordTypeStrings {
32  QStringList wordType; // better have this hierarchical
33  KEduVocWordFlags grammarType;
34  };
35 
36  // all data as deep copy
37  KEduVocExpression expression;
38  // the word types cannot be copied, thus per translation (int) save parent types and the type
39  QMap<int, WordTypeStrings> wordTypes;
40  };
41 
42  void setTranslations(QList<KEduVocTranslation*> translation);
43  QList<KEduVocTranslation *> translationList() const;
44  QList<VocabularyMimeData::MimeExpression> expressionList() const;
45 
46  QVariant retrieveData(const QString & mimeType, QVariant::Type type) const;
47 
48  QStringList formats() const;
49 
50 
51 private:
52  QList<KEduVocTranslation*> m_translations;
53  QList <MimeExpression> m_expressions;
54  QString m_text;
55 };
56 
57 
58 #endif
VocabularyMimeData::MimeExpression::WordTypeStrings
Definition: vocabularymimedata.h:31
VocabularyMimeData::MimeExpression::expression
KEduVocExpression expression
Definition: vocabularymimedata.h:37
VocabularyMimeData::MimeExpression
Definition: vocabularymimedata.h:30
QMap
QMimeData
VocabularyMimeData::retrieveData
QVariant retrieveData(const QString &mimeType, QVariant::Type type) const
Definition: vocabularymimedata.cpp:72
VocabularyMimeData::MimeExpression::WordTypeStrings::wordType
QStringList wordType
Definition: vocabularymimedata.h:32
VocabularyMimeData::formats
QStringList formats() const
Definition: vocabularymimedata.cpp:85
QString
QList< KEduVocTranslation * >
QStringList
VocabularyMimeData::MimeExpression::wordTypes
QMap< int, WordTypeStrings > wordTypes
Definition: vocabularymimedata.h:39
VocabularyMimeData::expressionList
QList< VocabularyMimeData::MimeExpression > expressionList() const
Definition: vocabularymimedata.cpp:90
VocabularyMimeData
Definition: vocabularymimedata.h:26
VocabularyMimeData::translationList
QList< KEduVocTranslation * > translationList() const
Definition: vocabularymimedata.cpp:67
VocabularyMimeData::setTranslations
void setTranslations(QList< KEduVocTranslation * > translation)
Definition: vocabularymimedata.cpp:23
VocabularyMimeData::MimeExpression::WordTypeStrings::grammarType
KEduVocWordFlags grammarType
Definition: vocabularymimedata.h:33
QVariant
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