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

kalgebra

  • sources
  • kde-4.14
  • kdeedu
  • kalgebra
  • src
varedit.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2007 by Aleix Pol <aleixpol@kde.org> *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License *
6  * as published by the Free Software Foundation; either version 2 *
7  * of the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the Free Software *
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
17  *************************************************************************************/
18 
19 #ifndef VAREDIT_H
20 #define VAREDIT_H
21 
22 #include <KDialog>
23 
24 #include <QRadioButton>
25 #include <QLabel>
26 
27 #include <analitza/expression.h>
28 
29 namespace Analitza
30 {
31 class Analyzer;
32 class Variables;
33 class Expression;
34 class ExpressionEdit;
35 }
36 
42 class VarEdit : public KDialog
43 {
44  Q_OBJECT
45  public:
47  explicit VarEdit(QWidget *parent = 0, bool modal = false);
48 
50  void setName(const QString& newVar);
51 
53  void setAnalitza(Analitza::Analyzer *na);
54 
56  Analitza::Expression val();
57 
58  private:
59  bool canRemove(const QString& name) const;
60 
61  Analitza::ExpressionEdit *m_exp;
62 
63  QLabel *m_valid;
64  Analitza::Variables *vars;
65  bool m_correct;
66  QString m_var;
67 
68  private slots:
69  void edit();
70  void ok();
71  void removeVariable();
72 };
73 
74 #endif
QWidget
VarEdit
The VarEdit provides a dialog to allow users to edit/create a variable.
Definition: varedit.h:42
KDialog
VarEdit::VarEdit
VarEdit(QWidget *parent=0, bool modal=false)
Constructor.
Definition: varedit.cpp:33
VarEdit::setAnalitza
void setAnalitza(Analitza::Analyzer *na)
Sets an Analitza which will evaluate it.
Definition: varedit.cpp:129
QString
VarEdit::setName
void setName(const QString &newVar)
Sets the editing variable name.
Definition: varedit.cpp:67
VarEdit::val
Analitza::Expression val()
Returns the resulting variable expression.
Definition: varedit.cpp:92
QLabel
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalgebra

Skip menu "kalgebra"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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