Overte C++ Documentation
LogDialog.h
1 //
2 // LogDialog.h
3 // interface/src/ui
4 //
5 // Created by Stojce Slavkovski on 12/12/13.
6 // Copyright 2013 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_LogDialog_h
13 #define hifi_LogDialog_h
14 
15 #include "BaseLogDialog.h"
16 #include <SettingHandle.h>
17 
18 class QCheckBox;
19 class QPushButton;
20 class QComboBox;
21 class QLabel;
22 class QResizeEvent;
23 class AbstractLoggerInterface;
24 
25 class LogDialog : public BaseLogDialog {
26  Q_OBJECT
27 
28 public:
29  LogDialog(QWidget* parent, AbstractLoggerInterface* logger);
30 
31 public slots:
32  void appendLogLine(QString logLine) override;
33 
34 private slots:
35  void handleRevealButton();
36  void handleShowSourceDebuggingCheckbox(int);
37  void handleExtraDebuggingCheckbox(int);
38  void handleKeepWindowOnTop(int);
39  void handleDebugPrintBox(int);
40  void handleInfoPrintBox(int);
41  void handleCriticalPrintBox(int);
42  void handleWarningPrintBox(int);
43  void handleSuppressPrintBox(int);
44  void handleFatalPrintBox(int);
45  void handleUnknownPrintBox(int);
46  void handleFilterDropdownChanged(int);
47  void handleAllLogsButton();
48  void printLogFile();
49 
50 protected:
51  void resizeEvent(QResizeEvent* event) override;
52  void closeEvent(QCloseEvent* event) override;
53 
54  QString getCurrentLog() override;
55  void updateMessageCount();
56 
57 
58 private:
59  QCheckBox* _showSourceDebuggingBox;
60  QCheckBox* _extraDebuggingBox;
61  QCheckBox* _keepOnTopBox;
62  QPushButton* _revealLogButton;
63  QPushButton* _allLogsButton;
64  QCheckBox* _debugPrintBox;
65  QCheckBox* _infoPrintBox;
66  QCheckBox* _criticalPrintBox;
67  QCheckBox* _warningPrintBox;
68  QCheckBox* _suppressPrintBox;
69  QCheckBox* _fatalPrintBox;
70  QCheckBox* _unknownPrintBox;
71  QComboBox* _filterDropdown;
72  QLabel* _messageCount;
73  QString _filterSelection;
74  QString _countLabel;
75  AbstractLoggerInterface* _logger;
76  Setting::Handle<QRect> _windowGeometry;
77  int _count = 0;
78 };
79 
80 #endif // hifi_LogDialog_h