swift
logcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_LOGCOMPONENT_H
7 #define SWIFT_GUI_LOGCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QPlainTextEdit>
12 #include <QScopedPointer>
13 #include <QString>
14 
15 #include "gui/swiftguiexport.h"
16 #include "misc/loghistory.h"
17 #include "misc/statusmessagelist.h"
18 
19 class QAction;
20 class QPoint;
21 class QWidget;
22 
23 namespace Ui
24 {
25  class CLogComponent;
26 }
27 namespace swift::gui::components
28 {
30  class SWIFT_GUI_EXPORT CConsoleTextEdit : public QPlainTextEdit
31  {
32  Q_OBJECT
33 
34  public:
36  CConsoleTextEdit(QWidget *parent = nullptr);
37 
38  protected:
40  void customMenuRequested(const QPoint &pos);
41  };
42 
44  class SWIFT_GUI_EXPORT CLogComponent : public QFrame
45  {
46  Q_OBJECT
47 
48  public:
50  explicit CLogComponent(QWidget *parent = nullptr);
51 
53  virtual ~CLogComponent();
54 
56  void displayLog(bool attention = false);
57 
59  void filterUseRadioButtonDescriptiveIcons(bool oneLetterText);
60 
62  void showFilterDialog();
63 
65  void showFilterBar();
66 
68  void hideFilterBar();
69 
71  void showDetails(bool details);
72 
74  void setMaxLogMessages(int max);
75 
77  void setNoSorting();
78 
80  void setSorting(const swift::misc::CPropertyIndex &propertyIndex, Qt::SortOrder order);
81 
83  void clear();
84 
86  void clearMessages();
87 
88  signals:
91 
92  private:
93  QScopedPointer<Ui::CLogComponent> ui;
95  };
96 } // namespace swift::gui::components
97 #endif // SWIFT_GUI_LOGCOMPONENT_H
Text edit for our log component.
Definition: logcomponent.h:31
GUI displaying log and status messages.
Definition: logcomponent.h:45
void requestAttention()
Make me visible.
Allows distributed access to the log messages of a central CLogHistory.
Definition: loghistory.h:50
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.