• 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
  • plasmoids
  • calculator
kalgebraplasma.h
Go to the documentation of this file.
1 /*************************************************************************************
2  * Copyright (C) 2008 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 
20 #ifndef KALGEBRAPLASMA_HEADER
21 #define KALGEBRAPLASMA_HEADER
22 
23 #include <Plasma/PopupApplet>
24 #include <Plasma/Label>
25 #include <Plasma/LineEdit>
26 #include <KLineEdit>
27 #include <QGraphicsLinearLayout>
28 #include <analitza/analyzer.h>
29 
30 class QSizeF;
31 class QLabel;
32 
33 class KAlgebraPlasmoid : public Plasma::PopupApplet
34 {
35  Q_OBJECT
36  public:
37  KAlgebraPlasmoid(QObject *parent, const QVariantList &args);
38  ~KAlgebraPlasmoid();
39 
40  void init();
41  virtual QGraphicsWidget* graphicsWidget();
42 
43  private slots:
44  void simplify();
45  void addOperation();
46 
47  private:
48  static QColor correctColor();
49  static QColor errorColor();
50  static int simplificationSize();
51 
52  void plasmoidFont(bool big, const QColor& c, bool bold);
53 
54  QGraphicsWidget* m_widget;
55  QGraphicsLinearLayout* m_layout;
56  Plasma::LineEdit *m_input;
57  Plasma::Label *m_output;
58  Analitza::Analyzer a;
59 };
60 
61 // This is the command that links your applet to the .desktop file
62 K_EXPORT_PLASMA_APPLET(kalgebraplasmoid, KAlgebraPlasmoid)
63 
64 #endif
QGraphicsLinearLayout
KAlgebraPlasmoid::KAlgebraPlasmoid
KAlgebraPlasmoid(QObject *parent, const QVariantList &args)
Definition: kalgebraplasma.cpp:44
QObject
KAlgebraPlasmoid::init
void init()
Definition: kalgebraplasma.cpp:54
QGraphicsWidget
KAlgebraPlasmoid::graphicsWidget
virtual QGraphicsWidget * graphicsWidget()
Definition: kalgebraplasma.cpp:61
QColor
QSizeF
KAlgebraPlasmoid::~KAlgebraPlasmoid
~KAlgebraPlasmoid()
Definition: kalgebraplasma.cpp:52
KAlgebraPlasmoid
Definition: kalgebraplasma.h:33
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