aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-12-30 19:16:08 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2018-12-30 19:16:08 +0000
commitb125858347f74f195ad6affdcbb07b23700ece07 (patch)
treec31c9061a6810b95d1ba6b9d1dbea124d4c4042b /src/qmmpui
parent1f0f27229fe276e9840a3b268bfeffd0a270479d (diff)
downloadqmmp-b125858347f74f195ad6affdcbb07b23700ece07.tar.gz
qmmp-b125858347f74f195ad6affdcbb07b23700ece07.tar.bz2
qmmp-b125858347f74f195ad6affdcbb07b23700ece07.zip
fixed api documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8545 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui')
-rw-r--r--src/qmmpui/commandlinehandler.h55
1 files changed, 48 insertions, 7 deletions
diff --git a/src/qmmpui/commandlinehandler.h b/src/qmmpui/commandlinehandler.h
index b90db12e0..1c32ebb40 100644
--- a/src/qmmpui/commandlinehandler.h
+++ b/src/qmmpui/commandlinehandler.h
@@ -44,6 +44,9 @@ public:
* Object destructor
*/
virtual ~CommandLineHandler() {}
+ /*!
+ * Registers command line options. Subclass should implement this function
+ */
virtual void registerOprions() = 0;
/*!
* Returns command line plugin short name for internal usage.
@@ -58,28 +61,65 @@ public:
/*!
* Executes given command.
* Subclass should reimplement this function.
- * @param id Command id to execute
+ * @param id Command identifier to execute
* @param args Command arguments
* @return Command output
*/
virtual QString executeCommand(int id, const QStringList &args) = 0;
-
+ /*!
+ * Returns a list of help strings.
+ */
QStringList helpString() const;
+ /*!
+ * Returns help string for specified option.
+ * \param id Command line option identifier.
+ * \return
+ */
QString helpString(int id) const;
+ /*!
+ * Returtns identifier for specified option name or \b -1
+ * if option is not supported.
+ * \param name Command line option name.
+ */
int identify(const QString &name) const;
-
+ /*!
+ * These flags describe attributes that change the behavior of command line option
+ * processing.
+ */
enum OptionFlag
{
- HIDDEN_FROM_HELP = 0x1,
- NO_START = 0x2
+ HIDDEN_FROM_HELP = 0x1, /*!< Hide this option in the user-visible help output. */
+ NO_START = 0x2 /*!< Do not start player instance (useful for extra help options). */
};
Q_DECLARE_FLAGS(OptionFlags, OptionFlag)
-
+ /*!
+ * Returtns flags for specified option identifier
+ * \param id Command line option identifier.
+ */
CommandLineHandler::OptionFlags flags(int id) const;
protected:
+ /*!
+ * Registers command line option. This function should be called inside \b registerOprions() implementation.
+ * \param id Option identifier.
+ * \param name Option name.
+ * \param helpString Option description.
+ * \param values Value name list (optional).
+ */
void registerOption(int id, const QString &name, const QString &helpString, const QStringList &values = QStringList());
+ /*!
+ * Registers command line option. This function should be called inside \b registerOprions() implementation.
+ * \param id Option identifier.
+ * \param names Option names (i.e. short and long variants).
+ * \param helpString Option description.
+ * \param values Value name list (optional).
+ */
void registerOption(int id, const QStringList &names, const QString &helpString, const QStringList &values = QStringList());
+ /*!
+ * Changes command line option flags.
+ * \param id Option identifier.
+ * \param flags Option flags.
+ */
void setOptionFlags(int id, OptionFlags flags);
private:
@@ -94,7 +134,8 @@ private:
{
return names == opt.names &&
values == opt.values &&
- helpString == opt.helpString;
+ helpString == opt.helpString &&
+ flags == opt.flags;
}
};