OpenWalnut  1.5.0dev
WQtModuleMetaInfo.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WQTMODULEMETAINFO_H
26 #define WQTMODULEMETAINFO_H
27 
28 #ifdef OW_FORCE_WEBKIT
29  #include <QWebFrame> //NOLINT
30 #else
31  #include <QWebEnginePage> //NOLINT
32 #endif
33 #include <QWidget>
34 
35 #include "core/kernel/WModule.h"
36 
37 /**
38  * Text widget showing the module meta data.
39  */
40 class WQtModuleMetaInfo: public QWidget
41 {
42  Q_OBJECT
43 public:
44  /**
45  * Default constructor.
46  *
47  * \param parent the parent widget
48  * \param module the module for which to show the meta info
49  */
50  WQtModuleMetaInfo( WModule::SPtr module, QWidget* parent = 0 );
51 
52  /**
53  * Destructor.
54  */
55  virtual ~WQtModuleMetaInfo();
56 public slots:
57  /**
58  * Resets the webview and provides the module info again.
59  */
60  void resetContent();
61 protected:
62 private:
63  /**
64  * The module.
65  */
67 
68  /**
69  * The frame containing the module meta info
70  */
71 #ifdef OW_FORCE_WEBKIT
72  QWebFrame* m_frame;
73 #else
74  QWebEnginePage* m_page;
75 #endif
76 };
77 
78 #endif // WQTMODULEMETAINFO_H
79 
std::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
Definition: WModule.h:106
Text widget showing the module meta data.
WQtModuleMetaInfo(WModule::SPtr module, QWidget *parent=0)
Default constructor.
WModule::SPtr m_module
The module.
QWebEnginePage * m_page
The frame containing the module meta info.
virtual ~WQtModuleMetaInfo()
Destructor.
void resetContent()
Resets the webview and provides the module info again.