parley
guifrontend.cpp
Go to the documentation of this file.
36 : AbstractFrontend(parent), m_modeWidget(0), m_lastImage("invalid"), m_currentBox(0), m_newBoxIfCorrect(0), m_newBoxIfWrong(0)
52 connect(m_themedBackgroundRenderer, SIGNAL(backgroundChanged(QPixmap)), this, SLOT(backgroundChanged(QPixmap)));
59 connect(m_ui->countAsCorrectButton, SIGNAL(clicked()), this, SLOT(countAsCorrectButtonClicked()));
90 if (/*m_modeWidget->metaObject()->className() == QLatin1String("WrittenPracticeWidget")*/false) {
140 m_ui->gradeLabel->setText(i18nc("Display of the current confidence level during practice, 1st param is either initial or long term",
208 m_ui->totalProgress->setToolTip(i18np("You answered correctly %2 of a total of %1 word.\nYou are %3% done.",
287 m_ui->imageWidget->setPixmap(m_themedBackgroundRenderer->getPixmapForId("image-placeholder", QSize(150, 150)));
395 QColor c = m_themedBackgroundRenderer->fontColor("Outer", p.color(QPalette::Active, QPalette::WindowText));
402 c = m_themedBackgroundRenderer->fontColor("Central", p.color(QPalette::Active, QPalette::WindowText));
409 c = m_themedBackgroundRenderer->fontColor("Correct", scheme.foreground(KColorScheme::PositiveText).color());
413 c = m_themedBackgroundRenderer->fontColor("Wrong", scheme.foreground(KColorScheme::NegativeText).color());
virtual void setResultState(ResultState resultState)
The result state indicated whether a word is counted as correct (and grades are raised) and can be ch...
Definition: guifrontend.cpp:315
Type type() const
void setPalette(const QPalette &)
void setColor(ColorGroup group, ColorRole role, const QColor &color)
virtual void setQuestion(const QVariant &question)=0
virtual void setFeedback(const QVariant &feedback)
Definition: guifrontend.cpp:304
virtual void setSolutionSound(const KUrl &soundUrl)
Definition: guifrontend.cpp:299
virtual void showQuestion()=0
virtual void setSolutionImage(const KUrl &img)
Definition: guifrontend.cpp:265
virtual void modeWidgetDestroyed(QObject *obj=0)
To be called prior to deleting a modeWidget.
Definition: guifrontend.cpp:431
QPixmap getScaledBackground()
Definition: themedbackgroundrenderer.cpp:78
virtual void setSolution(const QVariant &solution)
Definition: guifrontend.cpp:255
virtual void objectDestroyed(QObject *obj=0)
To be called prior to focus change in deletion to allow any cleanup.
Definition: abstractwidget.cpp:30
QMargins contentMargins()
Definition: themedbackgroundrenderer.cpp:190
virtual void setSolutionSound(const KUrl &soundUrl)=0
Definition: abstractwidget.h:27
void hintAction()
virtual void setSolution(const QVariant &solution)=0
void setScalingEnabled(bool scaling, bool onlyDownscaling=true)
Definition: imagewidget.cpp:224
void showSetResultButtons(bool show)
Definition: guifrontend.cpp:187
size
QColor fontColor(const QString &context, const QColor &fallback)
Definition: themedbackgroundrenderer.cpp:106
virtual void setFinishedWordsTotalWords(int finished, int total)
The status such as lesson or number of words has changed.
Definition: guifrontend.cpp:202
QString number(int n, int base)
virtual void setQuestion(const QVariant &question)
Definition: guifrontend.cpp:239
void setKeepAspectRatio(Qt::AspectRatioMode mode)
Definition: imagewidget.cpp:230
bool eventFilter(QObject *object, QEvent *event)
Definition: guifrontend.cpp:195
virtual void setQuestionFont(const QFont &font)=0
virtual void setSynonym(const QString &entry)=0
virtual void setSolutionPronunciation(const QString &pronunciationText)
Definition: guifrontend.cpp:294
virtual void setSolutionPronunciation(const QString &pronunciationText)=0
void addRect(const QString &name, const QRect &rect)
Definition: themedbackgroundrenderer.cpp:69
virtual void setSolutionFont(const QFont &font)
Definition: guifrontend.cpp:275
void setPixmap(const QPixmap &pixmap)
Definition: imagewidget.cpp:200
virtual bool eventFilter(QObject *watched, QEvent *event)
virtual void setFeedbackState(AbstractFrontend::ResultState feedbackState)=0
virtual void setQuestionPronunciation(const QString &pronunciationText)=0
virtual void setResultState(AbstractFrontend::ResultState resultState)=0
QPalette palette()
virtual QVariant userInput()=0
void showGrade(int preGrade, int grade)
Definition: guifrontend.cpp:134
bool isNull() const
void setTheme(const QString &theme)
Definition: themedbackgroundrenderer.cpp:50
virtual void setSolutionFont(const QFont &font)=0
virtual void setSynonym(const QString &entry)
set a new synonym that should be shown
Definition: guifrontend.cpp:164
void skipAction()
virtual void showSolution()=0
virtual void setFeedbackState(ResultState feedbackState)
The feedback state tells the user if the currently entered word is correct (independent of whether th...
Definition: guifrontend.cpp:309
void continueAction()
void updateBackground()
Definition: themedbackgroundrenderer.cpp:119
QPixmap getPixmapForId(const QString &id, QSize size=QSize())
Definition: themedbackgroundrenderer.cpp:168
virtual void setQuestionSound(const KUrl &soundUrl)=0
virtual void setFeedback(const QVariant &feedback)=0
virtual void setHint(const QVariant &hint)=0
void backgroundChanged(const QPixmap &pixmap)
Definition: guifrontend.cpp:182
Definition: abstractfrontend.h:26
virtual void setHint(const QVariant &hint)
Definition: guifrontend.cpp:234
virtual void setQuestionPronunciation(const QString &pronunciationText)
Definition: guifrontend.cpp:245
virtual void setQuestionFont(const QFont &font)
Definition: guifrontend.cpp:270
void setKnownLangFont(const QFont &font)
Definition: guifrontend.cpp:223
void setFadingEnabled(bool fading)
Definition: imagewidget.cpp:235
void setBoxes(grade_t currentBox, grade_t newBoxIfCorrect, grade_t newBoxIfWrong)
Definition: guifrontend.cpp:174
Definition: imagewidget.h:24
QFont learningLangFont() const
Definition: guifrontend.cpp:218
virtual void showSynonym()=0
void clearRects()
Definition: themedbackgroundrenderer.cpp:63
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
virtual void setQuestionSound(const KUrl &soundUrl)
Definition: guifrontend.cpp:250
virtual void setResultPalettes(const QPalette &correctPalette, const QPalette &wrongPalette)
Definition: abstractwidget.cpp:24
virtual void setQuestionImage(const KUrl &img)
Definition: guifrontend.cpp:260
void setLearningLangFont(const QFont &font)
Definition: guifrontend.cpp:228
void setContentsMargins(int left, int top, int right, int bottom)
singleShot
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
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.