File indexing completed on 2022-09-27 14:35:02

0001 //-*-C++-*-
0002 /*
0003  * KMix -- KDE's full featured mini mixer
0004  *
0005  * Copyright Christian Esken <esken@kde.org>
0006  *
0007  * This program is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Library General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2 of the License, or (at your option) any later version.
0011  *
0012  * This program is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Library General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Library General Public
0018  * License along with this program; if not, write to the Free
0019  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0020  */
0021 #ifndef KMixApp_h
0022 #define KMixApp_h
0023 
0024 #include <QMutex>
0025 #include <QObject>
0026 
0027 class QCommandLineParser;
0028 class KMixWindow;
0029 
0030 
0031 class KMixApp : public QObject
0032 {
0033     Q_OBJECT
0034 
0035  public:
0036     KMixApp();
0037     virtual ~KMixApp();
0038 
0039     void parseOptions(const QCommandLineParser &parser);
0040 
0041 public Q_SLOTS:
0042     void newInstance(const QStringList &arguments = QStringList(), const QString &workingDirectory = QString());
0043 
0044 private:
0045     bool restoreSessionIfApplicable(bool hasArgKeepvisibility, bool reset);
0046     void createWindowOnce(bool hasArgKeepvisibility, bool reset);
0047 
0048     KMixWindow *m_kmix;
0049     QRecursiveMutex creationLock;
0050     bool m_hasArgKeepvisibility;
0051     bool m_hasArgReset;
0052 };
0053 
0054 #endif