Add active conference to application class.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 28 Jul 2021 21:35:48 +0000 (23:35 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 28 Jul 2021 21:35:48 +0000 (23:35 +0200)
src/app/application.h

index 53727dbe891658a896b195a5a38e14d34c162b60..e01dfc5b5ece7ab6e28973d558e1257f3bc0756c 100644 (file)
 #define APPLICATION_H
 
 #include <QApplication>
+#include <conference.h>
 
 class Application : public QApplication
 {
     Q_OBJECT
 
 public:
-    Application(int& argc, char** argv)
-    : QApplication(argc, argv)
-    { }
-    virtual ~Application() { }
+    Application(int& argc, char** argv): QApplication(argc, argv) {}
+    virtual ~Application() {}
 
     virtual bool notify(QObject* receiver, QEvent* event);
+
+    void setActiveConference(Conference& conference) {mActiveConference = conference; mHasActiveConference = true;}
+    void unsetActiveConference() {mHasActiveConference = false;}
+    Conference& activeConference() {return mActiveConference;}
+    bool hasActiveConference() const {return mHasActiveConference;}
+
+private:
+    bool mHasActiveConference = false;
+    Conference mActiveConference;
 };
 
 #endif