klettres
klettresview.cpp
Go to the documentation of this file.
93 QString svgpath = KStandardDirs::locate("data", QString("klettres/pics/%1/%2").arg(theme->name(), theme->svgFileName()));
107 m_letterEdit->setStyleSheet(QString("border-style: solid; background-color: rgb(%1, %2, %3); color: rgb(%4, %5, %6) ; border-color: rgb(%4, %5, %6); border-bottom-right-radius:10; border-radius: 15px; border-width: 3px").arg(r1).arg(g1).arg(b1).arg(r2).arg(g2).arg(b2));
153 QObject::disconnect(m_letterEdit, SIGNAL(textChanged(QString)),this,SLOT(slotProcess(QString)));
167 QObject::disconnect(m_letterEdit, SIGNAL(textChanged(QString)), this, SLOT(slotProcess(QString)));
180 if ((!LangUtils::isIndian(lang) && (input_character.isLetter())) || (LangUtils::isIndian(lang)))
195 QObject::connect(m_letterEdit, SIGNAL(textChanged(const QString&)),this,SLOT(slotProcess(const QString&)) );
230 //TODO wait for the previous sound to be payed before playing again as it won't play if the previous one was not finished
static bool isIndian(const QString &lang)
Indian languages cannot have isLetter()
Definition: langutils.cpp:44
QSize size() const
QString & append(QChar ch)
int m_random
Random number that decides on the letter/syllable and sound.
Definition: klettresview.h:76
QString toUpper() const
virtual QColor letterInputColor() const =0
returns the color for the letter in the LineEdit box
virtual QRect inputRect(const QSize &windowsize) const =0
void render(QPainter *painter)
void slotProcess(const QString &inputLetter)
Definition: klettresview.cpp:164
QString m_upperLetter
Current letter entered uppercase i.e. m_inputLetter.upper()
Definition: klettresview.h:84
int length() const
void game()
Start playing displaying a new letter/syllable, playing the associated sound.
Definition: klettresview.cpp:148
int size() const
bool intersects(const QRect &rectangle) const
bool exists() const
QString & remove(int position, int n)
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
int m_timer
The timer value i.e. the time for displaying the letters/syllables.
Definition: klettresview.h:59
void update()
bool isLetter() const
void clear()
int width() const
QSize size() const
const QRect & rect() const
void setFont(const QFont &font)
void paintLetter(QPainter &p, const QRect &rect)
Paint the letter/syllable in levels 1 and 3.
Definition: klettresview.cpp:133
virtual QString name() const =0
bool load(const QString &filename)
void setPen(const QColor &color)
void chooseSound()
Choose a sound in random and ensure that it's not the same than the previous one. ...
Definition: klettresview.cpp:62
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
void drawText(const QPointF &position, const QString &text)
virtual QColor backgroundInputColor() const =0
returns the color for the background of the LineEdit box
virtual QColor letterColor() const =0
returns the color for displaying the letter/syllable
uint sounds
Number of sounds corresponding to the current language and level (alphabet or syllables) ...
Definition: soundfactory.h:63
ushort unicode() const
void paintBackground(QPainter &p, const QRect &rect)
Paint the background picture.
Definition: klettresview.cpp:122
QRect rect() const
int key() const
QChar toLower() const
virtual QRect wordRect(const QSize &windowsize) const =0
QChar toUpper() const
const QChar at(int position) const
void paintEvent(QPaintEvent *)
Paint the letter/syllable in levels 1 and 3 and the background.
Definition: klettresview.cpp:114
void getRgb(int *r, int *g, int *b, int *a) const
QPoint topLeft() const
int length() const
QString left(int n) const
Definition: kltheme.h:26
virtual QString svgFileName() const =0
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:12:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.