[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeedu/klatin/klatin
From: Anne-Marie Mahfouf <annma () kde ! org>
Date: 2004-10-17 18:20:26
Message-ID: 20041017182026.33A0A16C12 () office ! kde ! org
[Download RAW message or body]
CVS commit by annma:
first fixes from icefox test
CCMAIL=gwright@kde.org
M +8 -2 klatin.cpp 1.51
M +2 -0 klatin.h 1.25
M +4 -2 klatingrammar.cpp 1.22
M +1 -0 klatingrammar.h 1.8
M +3 -1 klatinui.rc 1.10
M +1 -1 klatinverbs.cpp 1.28
--- kdeedu/klatin/klatin/klatin.cpp #1.50:1.51
@@ -25,4 +25,5 @@
#include <qradiobutton.h>
#include <kstandarddirs.h>
+#include <kstatusbar.h>
#include <pwd.h>
@@ -38,5 +39,5 @@ KLatin::KLatin(QWidget* parent, const ch
{
m_section = 0;
-
+ statusBar()->message( i18n("Ready") );
// Setup the actions for the menubar
setupActions();
@@ -143,9 +144,14 @@ void KLatin::loadGrammar()
// then reset the GUI to go back to the menu
connect(klatingrammarsection, SIGNAL(exited()), this, SLOT(resetGUI()));
-
+ connect(klatingrammarsection, SIGNAL(emit_msg(QString&)), this, \
SLOT(slotWriteMsg(QString&))); // Set the section variable
m_section = 2;
}
+void KLatin::slotWriteMsg(const QString& message)
+{
+ statusBar()->message( message );
+}
+
void KLatin::loadVerbs()
{
--- kdeedu/klatin/klatin/klatin.h #1.24:1.25
@@ -81,4 +81,6 @@ private slots:
void settingsChanged();
+ void slotWriteMsg(const QString&);
+
private:
--- kdeedu/klatin/klatin/klatingrammar.cpp #1.21:1.22
@@ -169,6 +169,8 @@ void KLatinGrammar::nextQuestion()
void KLatinGrammar::checkAnswer()
{
- if (AnswerBox->text() == "") {
- KMessageBox::information(0, i18n("Inform the user that nothing has \
been typed in", "Please enter an answer."), i18n("Error")); + \
emit_msg("Grammar"); + if (AnswerBox->text().isEmpty()) {
+ emit_msg("Please enter an answer");
+ //KMessageBox::information(0, i18n("Inform the user that nothing has \
been typed in", "Please enter an answer."), i18n("Error")); }
--- kdeedu/klatin/klatin/klatingrammar.h #1.7:1.8
@@ -48,4 +48,5 @@ signals:
/// Signal that is emitted when the widget is closed
void exited();
+ void emit_msg(const QString&);
private:
/// Array that holds the 12 cases of a noun
--- kdeedu/klatin/klatin/klatinui.rc #1.9:1.10
@@ -1,4 +1,4 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="klatin" version="2">
+<kpartgui name="klatin" version="3">
<MenuBar>
@@ -12,4 +12,6 @@
</Menu>
<Menu name="settings" noMerge="1"><text>&Settings</text>
+ <Action name="options_show_statusbar"/>
+ <separator />
<Action name="options_configure_keybinding"/>
<Action name="options_configure"/>
--- kdeedu/klatin/klatin/klatinverbs.cpp #1.27:1.28
@@ -212,5 +212,5 @@ void KLatinVerbs::nextQuestion()
void KLatinVerbs::checkAnswer()
{
- if (AnswerBox->text() == "") {
+ if (AnswerBox->text().isEmpty()) {
KMessageBox::information(0, i18n("Inform the user that nothing has \
been typed in", "Please enter an answer."), i18n("Error")); return;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic