MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
ErrorPageWidget.hpp
1 #ifndef ERRORPAGEWIDGET_HPP
2 #define ERRORPAGEWIDGET_HPP
3 
4 #include <MultiWidgets/TextWidget.hpp>
5 
6 namespace Showcase
7 {
8  class ErrorPageWidget : public MultiWidgets::Widget
9  {
10  public:
11  ErrorPageWidget(MultiWidgets::WidgetPtr parent = nullptr,
12  const QString & errorText = "");
13  virtual ~ErrorPageWidget();
14 
15  void setError(const QString & errorText);
16 
17  virtual void update(const MultiWidgets::FrameInfo & frameInfo) override;
18 
19  void listApps();
20  void setShowExit(bool show);
21 
22  private:
23  void getAddress();
24 
25  QStringList getApps() const;
26 
27  MultiWidgets::TextWidgetPtr m_text;
28  MultiWidgets::TextWidgetPtr m_address;
29  MultiWidgets::WidgetPtr m_appContainer;
30 
31  Valuable::AttributeString m_error;
32  Valuable::AttributeString m_baseText;
33 
34  bool m_gotAddress;
35  };
36 
37 }
38 
39 #endif // ERRORPAGEWIDGET_HPP