• 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
synonymwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2008 Frederik Gladhorn <frederik.gladhorn@kdemail.net>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef SYNONYMWIDGET_H
15 #define SYNONYMWIDGET_H
16 
17 #include "ui_synonymwidget.h"
18 
19 #include <QModelIndex>
20 
21 class KEduVocExpression;
22 class KEduVocTranslation;
23 class KEduVocDocument;
24 class QStringListModel;
25 
26 namespace Editor
27 {
28 
29 class SynonymWidget : public QWidget, public Ui::SynonymWidget
30 {
31  Q_OBJECT
32 public:
33  enum SynonymWidgetType {
34  Synonym,
35  Antonym,
36  FalseFriend
37  };
38 
39  explicit SynonymWidget(SynonymWidgetType type, QWidget *parent = 0);
40 
41 public slots:
46  void setDocument(KEduVocDocument *doc);
47 
48  void setTranslation(KEduVocExpression* entry, int translation);
49 
50 private slots:
51  void togglePair();
52  void updateList();
53 
54 private:
55  KEduVocDocument *m_doc;
56 
57  // the one that was selected before
58  KEduVocTranslation* m_lastTranslation;
59  // the one the user clicked on latest
60  KEduVocTranslation* m_currentTranslation;
61  QStringListModel * m_listModel;
62  SynonymWidgetType m_type;
63 };
64 }
65 #endif
Editor::SynonymWidget::FalseFriend
Definition: synonymwidget.h:36
Editor::SynonymWidget::SynonymWidgetType
SynonymWidgetType
Definition: synonymwidget.h:33
QWidget
Editor::SynonymWidget::SynonymWidget
SynonymWidget(SynonymWidgetType type, QWidget *parent=0)
Definition: synonymwidget.cpp:25
QStringListModel
Editor::SynonymWidget::setTranslation
void setTranslation(KEduVocExpression *entry, int translation)
Definition: synonymwidget.cpp:43
Editor::SynonymWidget::Antonym
Definition: synonymwidget.h:35
QObject::parent
QObject * parent() const
Editor::SynonymWidget::Synonym
Definition: synonymwidget.h:34
Editor::SynonymWidget
Definition: synonymwidget.h:29
Editor::SynonymWidget::setDocument
void setDocument(KEduVocDocument *doc)
Register the document inside the widget so that it can be marked as modified.
Definition: synonymwidget.cpp:38
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