Warning, file /graphics/kphotoalbum/MainWindow/Options.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* SPDX-FileCopyrightText: 2016 Johannes Zarl-Zierl <johannes@zarl-zierl.at>
0002 
0003    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 #ifndef OPTIONS_H
0006 #define OPTIONS_H
0007 
0008 #include <QHostAddress>
0009 #include <QScopedPointer>
0010 #include <QUrl>
0011 class QCommandLineParser;
0012 
0013 namespace MainWindow
0014 {
0015 
0016 /**
0017  * @brief The Options class is a simple wrapper around QCommandLineParser that makes the command line arguments available after startup.
0018  */
0019 class Options
0020 {
0021 public:
0022     static Options *the();
0023 
0024     /**
0025      * @brief Gives direct access to the QCommandLineParser object.
0026      * This is for main().
0027      * @return
0028      */
0029     QCommandLineParser *parser() const;
0030 
0031     QUrl dbFile() const;
0032     /**
0033      * @brief demoMode
0034      * @return true, if demo mode is set.
0035      */
0036     bool demoMode() const;
0037     /**
0038      * @brief importFile
0039      * @return the QUrl of the import file, or an empty QUrl, if no import file is set.
0040      */
0041     QUrl importFile() const;
0042     /**
0043      * @brief listen
0044      * Access the address that was givent to the commandline "--listen" argument.
0045      * @return a null address if listening is disabled, otherwise an address to bind to.
0046      */
0047     QHostAddress listen() const;
0048     /**
0049      * @brief searchOnStartup
0050      * @return true, if we want to search for images on startup
0051      */
0052     bool searchForImagesOnStart() const;
0053 
0054 private:
0055     class OptionsPrivate;
0056     Options();
0057 
0058     static Options *s_instance;
0059     const QScopedPointer<OptionsPrivate> d;
0060 };
0061 
0062 }
0063 
0064 #endif /* OPTIONS_H */
0065 
0066 // vi:expandtab:tabstop=4 shiftwidth=4: