Thread: [Ktutorial-commits] SF.net SVN: ktutorial:[242] trunk/ktutorial/ktutorial-library/src/tutorials /Us
Status: Alpha
Brought to you by:
danxuliu
From: <dan...@us...> - 2010-05-18 15:42:21
|
Revision: 242 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=242&view=rev Author: danxuliu Date: 2010-05-18 15:42:15 +0000 (Tue, 18 May 2010) Log Message: ----------- Add widget highlighting information to the tutorial about how to use tutorials. Modified Paths: -------------- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp Modified: trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-05-18 15:39:17 UTC (rev 241) +++ trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-05-18 15:42:15 UTC (rev 242) @@ -29,6 +29,7 @@ #include "../TutorialInformation.h" #include "../WaitForEvent.h" #include "../WaitForSignal.h" +#include "../view/StepTextWidget.h" #include "../view/StepWidget.h" class WaitForLeftMouseButtonPressed: public WaitForEvent { @@ -77,12 +78,12 @@ }; -class CloseTextEditStep: public Step { +class HighlightTextEditStep: public Step { Q_OBJECT public: - CloseTextEditStep(): - Step("closeTextEdit") { + HighlightTextEditStep(): + Step("highlightTextEdit") { } virtual void setup() { @@ -222,21 +223,41 @@ addStep(clearTextStep); - //Step closeTextEdit - Step* closeTextEditStep = new CloseTextEditStep(); - closeTextEditStep->setText(i18nc("@info", + //Step textCleared + Step* textClearedStep = new Step("textCleared"); + textClearedStep->setText(i18nc("@info", "<para>Do you see? You are in a new step, but you didn't tell the tutorial to " "continue to the next step, and neither you had to select between several " "options. The tutorial advanced automatically when you erased the text as " "requested. This will be the most common way to advance from one step to " -"another.</para>" +"another.</para>")); + + textClearedStep->addOption(new Option(i18nc("@action", "Continue")), + "highlightTextEdit"); + + addStep(textClearedStep); + + //Step highlightTextEdit + //As changing to another step stops the highlighting in the currently + //highlighted widget, it is not possible to use one step to show how to + //highlight the widget and the next one to show how to stop highlighting it + Step* highlightTextEditStep = new HighlightTextEditStep(); + highlightTextEditStep->setText(i18nc("@info", +"<para>Sometimes, a tutorial may provide a link to a <emphasis>widget" +"</emphasis> (an element of the graphical user interface, like a button). For " +"example, <a href=\"widget:usingKTutorialTextEdit\">this is a link to the text " +"area</a>.</para>" +"<para>When you click on a link to a widget, the widget is highlighted to help " +"you to spot it. If you click again on it, the highlighting will be stopped. " +"In this example it is pretty clear what the text area refers to, but it can " +"be useful in tutorials for more complex applications.</para>" "<para>Ok, close the window with the text area to continue with the " "tutorial.</para>")); //WaitFor is added in step setup, as it uses an object that isn't available //when the tutorial is created - addStep(closeTextEditStep); + addStep(highlightTextEditStep); //Step moveWidgetPress Step* moveWidgetPressStep = new MoveWidgetPressStep(); @@ -289,7 +310,7 @@ findObject<QTextEdit*>("usingKTutorialTextEdit"); if (textEdit->toPlainText().isEmpty()) { - nextStep("closeTextEdit"); + nextStep("highlightTextEdit"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2010-06-13 18:25:29
|
Revision: 246 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=246&view=rev Author: danxuliu Date: 2010-06-13 18:25:22 +0000 (Sun, 13 Jun 2010) Log Message: ----------- Fix next step after "clearText" in "Using the tutorials" tutorial. Modified Paths: -------------- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp Modified: trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-05-22 21:30:54 UTC (rev 245) +++ trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2010-06-13 18:25:22 UTC (rev 246) @@ -310,7 +310,7 @@ findObject<QTextEdit*>("usingKTutorialTextEdit"); if (textEdit->toPlainText().isEmpty()) { - nextStep("highlightTextEdit"); + nextStep("textCleared"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dan...@us...> - 2012-06-27 11:35:58
|
Revision: 347 http://ktutorial.svn.sourceforge.net/ktutorial/?rev=347&view=rev Author: danxuliu Date: 2012-06-27 11:35:47 +0000 (Wed, 27 Jun 2012) Log Message: ----------- Set the text area window in the UsingKTutorial tutorial to stay on top. This prevents the text area to be hidden when the user clicks on the "continue" button if the application that shows the tutorial is maximized (as when the button is clicked the tutorial widget gets the focus, and the main application window hides the text area window). Modified Paths: -------------- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp Modified: trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp =================================================================== --- trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2012-06-27 09:34:46 UTC (rev 346) +++ trunk/ktutorial/ktutorial-library/src/tutorials/UsingKTutorial.cpp 2012-06-27 11:35:47 UTC (rev 347) @@ -62,7 +62,7 @@ virtual void setup() { QTextEdit* textEdit = new QTextEdit(KTutorial::self()->parentWidget()); textEdit->setAttribute(Qt::WA_DeleteOnClose); - textEdit->setWindowFlags(Qt::Window); + textEdit->setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint); textEdit->setObjectName("usingKTutorialTextEdit"); textEdit->setText(i18nc("@info/plain Plain text in a QTextEdit", "Look at me! I am the text area!")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |