• 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
latexwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2010 Daniel Laidig <laidig@kde.org>
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 #ifndef LATEXWIDGET_H
14 #define LATEXWIDGET_H
15 
16 #include "ui_latexwidget.h"
17 
18 #include <QItemDelegate>
19 #include <QWidget>
20 
21 class QDataWidgetMapper;
22 class KEduVocDocument;
23 class KEduVocExpression;
24 class KEduVocTranslation;
25 
26 namespace Practice
27 {
28 class LatexRenderer;
29 }
30 
31 class VocabularyFilter;
32 
33 namespace Editor
34 {
35 
36 class LatexWidget : public QWidget, public Ui::LatexWidget
37 {
38  Q_OBJECT
39 
40 public:
41  LatexWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent = 0);
42  ~LatexWidget();
43 
44 public slots:
48  void setTranslation(KEduVocExpression *entry, int translation);
49 
53  void slotDocumentChanged(KEduVocDocument *doc);
54 
58  void slotSelectionChanged(const QItemSelection &, const QItemSelection &);
59 
60  void checkBoxToggled();
61 
62  void updateLatex();
63 
64 private:
65  VocabularyFilter *m_model;
66  KEduVocDocument *m_doc;
67  QDataWidgetMapper *m_mapper;
68  KEduVocTranslation *m_translation;
69  QLabel m_hiddenLabel;
70  Practice::LatexRenderer *m_renderer;
71 };
72 
73 class LatexDelegate : public QItemDelegate
74 {
75  Q_OBJECT
76 public:
77  LatexDelegate(QObject *parent = 0);
78 
79  void setEditorData(QWidget *editor, const QModelIndex &index) const;
80  void setModelData(QWidget * editor, QAbstractItemModel * model, const QModelIndex & index) const;
81  void setMathModeCheckBox(QCheckBox *checkBox) {
82  m_checkBox = checkBox;
83  }
84 
85 private:
86  QCheckBox *m_checkBox;
87 };
88 }
89 
90 #endif //LATEXWIDGET_H
Editor::LatexWidget::slotDocumentChanged
void slotDocumentChanged(KEduVocDocument *doc)
Called when a KEduVocDocument change happened.
Definition: latexwidget.cpp:61
QModelIndex
QWidget
Editor::LatexDelegate::setMathModeCheckBox
void setMathModeCheckBox(QCheckBox *checkBox)
Definition: latexwidget.h:81
Editor::LatexDelegate::setEditorData
void setEditorData(QWidget *editor, const QModelIndex &index) const
Definition: latexwidget.cpp:105
VocabularyFilter
Definition: vocabularyfilter.h:26
Practice::LatexRenderer
Definition: latexrenderer.h:27
Editor::LatexWidget::~LatexWidget
~LatexWidget()
Definition: latexwidget.cpp:40
Editor::LatexDelegate
Definition: latexwidget.h:73
Editor::LatexDelegate::LatexDelegate
LatexDelegate(QObject *parent=0)
Definition: latexwidget.cpp:101
Editor::LatexWidget::LatexWidget
LatexWidget(VocabularyFilter *model, KEduVocDocument *doc, QWidget *parent=0)
Definition: latexwidget.cpp:23
QObject
QCheckBox
QDataWidgetMapper
QItemDelegate
Editor::LatexWidget
Definition: latexwidget.h:36
Editor::LatexWidget::slotSelectionChanged
void slotSelectionChanged(const QItemSelection &, const QItemSelection &)
Called when the selection changed in the vocabulary view.
Definition: latexwidget.cpp:66
QItemSelection
Editor::LatexWidget::updateLatex
void updateLatex()
Definition: latexwidget.cpp:86
Editor::LatexDelegate::setModelData
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
Definition: latexwidget.cpp:129
QAbstractItemModel
Editor::LatexWidget::setTranslation
void setTranslation(KEduVocExpression *entry, int translation)
Sets the selected word (KEduVocExpression) from the vocabularyView.
Definition: latexwidget.cpp:45
QLabel
QObject::parent
QObject * parent() const
Editor::LatexWidget::checkBoxToggled
void checkBoxToggled()
Definition: latexwidget.cpp:79
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