Warning, file /office/skrooge/skgbasegui/skghtmlboardwidget.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /*************************************************************************** 0002 * SPDX-FileCopyrightText: 2022 S. MANKOWSKI stephane@mankowski.fr 0003 * SPDX-FileCopyrightText: 2022 G. DE BURE support@mankowski.fr 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 ***************************************************************************/ 0006 #ifndef SKGHTMLBOARDWIDGET_H 0007 #define SKGHTMLBOARDWIDGET_H 0008 /** @file 0009 * This file is a generic Skrooge plugin for html/qml reports. 0010 * @see SKGReport 0011 * 0012 * @author Stephane MANKOWSKI / Guillaume DE BURE 0013 */ 0014 #include "skgbasegui_export.h" 0015 #include "skgboardwidget.h" 0016 #include "skgsimpleperiodedit.h" 0017 0018 class QLabel; 0019 class QQuickWidget; 0020 class KLineEdit; 0021 class SKGReport; 0022 0023 /** 0024 * This file is a generic Skrooge plugin for html/qml reports 0025 */ 0026 class SKGBASEGUI_EXPORT SKGHtmlBoardWidget : public SKGBoardWidget 0027 { 0028 Q_OBJECT 0029 public: 0030 /** 0031 * Default Constructor 0032 * @param iParent the parent widget 0033 * @param iDocument the document 0034 * @param iTitle the title 0035 * @param iTemplate the html template (.html) or the qml file (.qml) 0036 * @param iTablesRefreshing the list of table refreshing the report when the table is updated. (empty means all) 0037 * @param iOptions to enable options in menu 0038 * @param iEnableFilter to enable the filter 0039 */ 0040 explicit SKGHtmlBoardWidget(QWidget* iParent, 0041 SKGDocument* iDocument, 0042 const QString& iTitle, 0043 const QString& iTemplate, 0044 QStringList iTablesRefreshing = QStringList(), 0045 SKGSimplePeriodEdit::Modes iOptions = SKGSimplePeriodEdit::NONE, 0046 const QStringList& iAttributesForFilter = QStringList()); 0047 0048 /** 0049 * Default Destructor 0050 */ 0051 ~SKGHtmlBoardWidget() override; 0052 0053 /** 0054 * Get the current state 0055 * MUST BE OVERWRITTEN 0056 * @return a string containing all information needed to set the same state. 0057 * Could be an XML stream 0058 */ 0059 QString getState() override; 0060 0061 /** 0062 * Set the current state 0063 * MUST BE OVERWRITTEN 0064 * @param iState must be interpreted to set the state of the widget 0065 */ 0066 void setState(const QString& iState) override; 0067 0068 /** 0069 * Set the font point size 0070 * @param iPointSize font point size 0071 */ 0072 virtual void setPointSize(int iPointSize) const; 0073 0074 protected Q_SLOTS: 0075 void pageChanged(); 0076 void onTextFilterChanged(const QString& iFilter); 0077 virtual void dataModified(const QString& iTableName = QString(), int iIdTransaction = 0); 0078 0079 protected: 0080 QQuickWidget* m_Quick; 0081 SKGReport* m_Report; 0082 0083 private: 0084 Q_DISABLE_COPY(SKGHtmlBoardWidget) 0085 0086 QLabel* m_Text; 0087 QString m_Template; 0088 QStringList m_TablesRefreshing; 0089 bool m_refreshNeeded; 0090 0091 SKGSimplePeriodEdit* m_period; 0092 KLineEdit* m_filter; 0093 QStringList m_attributes; 0094 }; 0095 0096 #endif // SKGHTMLBOARDWIDGET_H