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

parley

  • sources
  • kde-4.12
  • kdeedu
  • parley
  • plasmoid
parley_plasma.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2008 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 
17 #ifndef PARLEYPLASMA_H
18 #define PARLEYPLASMA_H
19 
20 #include <Plasma/Applet>
21 #include <Plasma/Svg>
22 #include <plasma/dataengine.h>
23 #include <plasma/plasma.h>
24 
25 #include <QGraphicsTextItem>
26 
27 #include "ui_config.h"
28 
29 class KDialog;
30 class QFont;
31 class QSizeF;
32 class KConfigDialog;
33 
34 class ParleyPlasma : public Plasma::Applet
35 {
36  Q_OBJECT
37 
38  public:
39  ParleyPlasma(QObject *parent, const QVariantList &args);
40  ~ParleyPlasma();
41  void init();
42  void setContentSize(const QSizeF& size);
43  QSizeF contentSizeHint() const;
44  void paintInterface(QPainter *painter,
45  const QStyleOptionGraphicsItem *option,
46  const QRect& contentsRect);
47  void constraintsEvent(Plasma::Constraints constraints);
48 
49  public slots:
50  void createConfigurationInterface(KConfigDialog *parent);
51  void configAccepted();
52  void showFontSelectDlg();
53  void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data);
54  // in the config dialog a file was selected
55  void urlSelected (const KUrl &file);
56  void configChanged();
57  protected:
58  virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event );
59  virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
60 
61  private:
62  enum ShowSolution {
63  Hover = 0,
64  Always
65  };
66  Plasma::Svg *m_theme;
67  QGraphicsTextItem *m_label1;
68  QGraphicsTextItem *m_label2;
69 
70  Ui::config ui;
71 
72  QFont m_font;
73  QSizeF m_size;
74 
75  Plasma::DataEngine* m_engine;
76  KUrl m_sourceFile;
77  QStringList m_languages;
78  int m_solutionType;
79  int m_lang1;
80  int m_lang2;
81  int m_updateInterval;
82 };
83 
84 K_EXPORT_PLASMA_APPLET(parley, ParleyPlasma)
85 
86 #endif
ParleyPlasma
Definition: parley_plasma.h:34
ParleyPlasma::constraintsEvent
void constraintsEvent(Plasma::Constraints constraints)
Definition: parley_plasma.cpp:88
ParleyPlasma::init
void init()
Definition: parley_plasma.cpp:47
ParleyPlasma::hoverLeaveEvent
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: parley_plasma.cpp:277
KDialog
QObject
ParleyPlasma::hoverEnterEvent
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: parley_plasma.cpp:271
ParleyPlasma::ParleyPlasma
ParleyPlasma(QObject *parent, const QVariantList &args)
Definition: parley_plasma.cpp:26
ParleyPlasma::paintInterface
void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, const QRect &contentsRect)
Definition: parley_plasma.cpp:160
ParleyPlasma::contentSizeHint
QSizeF contentSizeHint() const
Definition: parley_plasma.cpp:155
ParleyPlasma::urlSelected
void urlSelected(const KUrl &file)
Definition: parley_plasma.cpp:210
KConfigDialog
ParleyPlasma::showFontSelectDlg
void showFontSelectDlg()
Definition: parley_plasma.cpp:230
ParleyPlasma::configAccepted
void configAccepted()
Definition: parley_plasma.cpp:235
ParleyPlasma::configChanged
void configChanged()
Definition: parley_plasma.cpp:66
ParleyPlasma::~ParleyPlasma
~ParleyPlasma()
Definition: parley_plasma.cpp:116
ParleyPlasma::setContentSize
void setContentSize(const QSizeF &size)
Definition: parley_plasma.cpp:150
ParleyPlasma::dataUpdated
void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data)
Definition: parley_plasma.cpp:120
ParleyPlasma::createConfigurationInterface
void createConfigurationInterface(KConfigDialog *parent)
Definition: parley_plasma.cpp:171
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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