Olive
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
debugdialog.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef DEBUGDIALOG_H
22 #define DEBUGDIALOG_H
23 
24 #include <QDialog>
25 #include <QTextEdit>
26 
33 class DebugDialog : public QDialog {
34  Q_OBJECT
35 public:
42  DebugDialog(QWidget* parent = nullptr);
43 
49  void Retranslate();
50 public slots:
54  void update_log();
55 protected:
59  virtual void changeEvent(QEvent* e) override;
64  virtual void showEvent(QShowEvent* event) override;
65 private:
69  QTextEdit* textEdit;
70 };
71 
72 namespace olive {
76 extern DebugDialog* DebugDialog;
77 }
78 
79 #endif // DEBUGDIALOG_H
DebugDialog(QWidget *parent=nullptr)
DebugDialog Constructor.
Definition: debugdialog.cpp:32
DebugDialog * DebugDialog
Omnipresent instance of DebugDialog to be shown or hidden as the user wants.
Definition: debugdialog.cpp:30
QTextEdit * textEdit
Display widget for the debug dialog.
Definition: debugdialog.h:69
virtual void showEvent(QShowEvent *event) override
Overrides show event to trigger an update of the visual log (the visual log does not update while the...
Definition: debugdialog.cpp:61
void update_log()
Update the visual log with the debug text from get_debug_str()
Definition: debugdialog.cpp:47
The DebugDialog class.
Definition: debugdialog.h:33
void Retranslate()
Retranslate window title.
Definition: debugdialog.cpp:42
virtual void changeEvent(QEvent *e) override
Overrides change event to trigger Retranslate() on a LanguageChange event.
Definition: debugdialog.cpp:52