[rkward-cvs] SF.net SVN: rkward: [1295] trunk/rkward/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Fri Feb 2 14:26:56 UTC 2007
Revision: 1295
http://svn.sourceforge.net/rkward/?rev=1295&view=rev
Author: tfry
Date: 2007-02-02 06:26:56 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
API documentation
Modified Paths:
--------------
trunk/rkward/rkward/dialogs/rkimportdialog.h
trunk/rkward/rkward/misc/rkspinbox.cpp
trunk/rkward/rkward/misc/rkspinbox.h
trunk/rkward/rkward/plugin/rkpluginsaveobject.h
Modified: trunk/rkward/rkward/dialogs/rkimportdialog.h
===================================================================
--- trunk/rkward/rkward/dialogs/rkimportdialog.h 2007-02-02 13:57:34 UTC (rev 1294)
+++ trunk/rkward/rkward/dialogs/rkimportdialog.h 2007-02-02 14:26:56 UTC (rev 1295)
@@ -27,15 +27,24 @@
class RKContextMap;
class RKImportDialogFormatSelector;
+/** This dialog is designed to allow the user to select a file, and file format. After that a suitable plugin
+is opened automatically to deal with this type of file . */
class RKImportDialog : public KFileDialog {
Q_OBJECT
public:
+/** constructor
+ at param context_id The id of the context containing the relevant plugins
+ at param parent Parent widget (dialog will be centered on this widget, if non-zeor */
RKImportDialog (const QString &context_id, QWidget *parent);
+/** dtor */
~RKImportDialog ();
public slots:
+/** The currently selected file extension filter was changed. Update the file format selection box accordingly. */
void filterChanged ();
protected:
+/** reimplemented to a) invoke the relevant plugin, b) trigger self-destruction of the dialog */
void accept ();
+/** reimplemented to trigger self-destruction of the dialog */
void reject ();
private:
int format_count;
@@ -46,6 +55,7 @@
RKContextMap *context;
};
+/** Internal helper class to RKImportDialog. Needed solely to work around a design flaw in the KFileDialog API */
class RKImportDialogFormatSelector : public QHBox {
friend class RKImportDialog;
private:
Modified: trunk/rkward/rkward/misc/rkspinbox.cpp
===================================================================
--- trunk/rkward/rkward/misc/rkspinbox.cpp 2007-02-02 13:57:34 UTC (rev 1294)
+++ trunk/rkward/rkward/misc/rkspinbox.cpp 2007-02-02 14:26:56 UTC (rev 1295)
@@ -98,6 +98,10 @@
delete validator;
validator = new_validator;
+ /* the integer value and boundaries are mostly meaningless in real mode. Effectively, what we do is:
+ 1) set the value to 0
+ 2) whenever the value has changed, change the real value by that many steps (updateDisplay ())
+ 3) goto 1 */
setMinValue (-1000);
setMaxValue (1000);
setSteps (1, 10);
Modified: trunk/rkward/rkward/misc/rkspinbox.h
===================================================================
--- trunk/rkward/rkward/misc/rkspinbox.h 2007-02-02 13:57:34 UTC (rev 1294)
+++ trunk/rkward/rkward/misc/rkspinbox.h 2007-02-02 14:26:56 UTC (rev 1295)
@@ -22,21 +22,42 @@
class QValidator;
-/** After constructing use one of setRealMode or setIntMode to initialize the Spinbox.
+/** A Spinbox that can operate in either integer or real number mode. Step-sizes are adjusted automatically according to the current value
+
+After constructing use one of setRealMode or setIntMode to initialize the Spinbox.
+
@author Thomas Friedrichsmeier
*/
class RKSpinBox : public QSpinBox {
Q_OBJECT
public:
+/** constructor. Use on of setIntMode or setRealMode to initialize the Spinbox! */
RKSpinBox (QWidget *parent = 0);
+/** dtor */
~RKSpinBox ();
-
+
+/** set the spinbox to operate on real numbers. When operating on real numbers, QSpinBox::value () is absolutely meaningless! Use realValue () to retrieve the value in this case
+ at param min minimum acceptable value
+ at param max maximum acceptable value
+ at param initial initial value
+ at param default_precision default precision of steps. E.g. 2 to make the second sub-decimal digit the one that is change by pressing up/down arrows, when the value is 0
+ at param max_precison maximum acceptable precision */
void setRealMode (double min, double max, double initial, int default_precision, int max_precision);
+/** set the spinbox to operate on integer numbers (like a regular QSpinBox, but step sizes are adjusted automatically
+ at param min minimum acceptable value
+ at param max maximum acceptable value
+ at param initial initial value */
void setIntMode (int min, int max, int initial);
+/** Only meaningful, when in real mode! Returns the current value
+ at returns the value if in real mode */
double realValue () { return real_value; };
+/** Only meaningful, when in real mode! Sets the new value
+ at param new_value the new value */
void setRealValue (double new_value);
protected:
+/** reimplemented from QSpinBox to update steps and value whenever the internal value changed */
void updateDisplay ();
+/** reimplemented from QSpinBox to update steps and value whenever the text was changed */
void interpretText ();
private:
enum Mode { Integer=0, Real=1 };
Modified: trunk/rkward/rkward/plugin/rkpluginsaveobject.h
===================================================================
--- trunk/rkward/rkward/plugin/rkpluginsaveobject.h 2007-02-02 13:57:34 UTC (rev 1294)
+++ trunk/rkward/rkward/plugin/rkpluginsaveobject.h 2007-02-02 14:26:56 UTC (rev 1295)
@@ -25,7 +25,7 @@
class RKSaveObjectChooser;
class QDomElement;
-/** RKComponent to select an object name to save something to
+/** RKComponent to select an R object name to save something to
@author Thomas Friedrichsmeier
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list