File indexing completed on 2024-05-05 17:19:05
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 SKGTABLEWIDGET_H 0007 #define SKGTABLEWIDGET_H 0008 /** @file 0009 * A table widget with more features. 0010 * 0011 * @author Stephane MANKOWSKI / Guillaume DE BURE 0012 */ 0013 0014 #include "skgbasegui_export.h" 0015 #include <qtablewidget.h> 0016 /** 0017 * This file is a combo box with more features. 0018 */ 0019 class SKGBASEGUI_EXPORT SKGTableWidget : public QTableWidget 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 /** 0025 * Default Constructor 0026 * @param iParent the parent 0027 */ 0028 explicit SKGTableWidget(QWidget* iParent); 0029 0030 /** 0031 * Default Destructor 0032 */ 0033 ~SKGTableWidget() override; 0034 0035 /** 0036 * Set the horizontal scroll bar stick to the maximum 0037 * @param iStick the stick state 0038 */ 0039 virtual void setStickHorizontal(bool iStick); 0040 0041 /** 0042 * Get the horizontal scroll bar stick to the maximum 0043 * @return the stick state 0044 */ 0045 virtual bool stickHorizontal() const; 0046 0047 /** 0048 * Set the vertical scroll bar stick to the maximum 0049 * @param iStick the stick state 0050 */ 0051 virtual void setStickVertical(bool iStick); 0052 0053 /** 0054 * Get the vertical scroll bar stick to the maximum 0055 * @return the stick state 0056 */ 0057 virtual bool stickVertical() const; 0058 0059 Q_SIGNALS: 0060 /** 0061 * Line must be removed 0062 */ 0063 void removeLine(int /*_t1*/); 0064 0065 protected: 0066 /** 0067 * Event filtering 0068 * @param iObject object 0069 * @param iEvent event 0070 * @return In your reimplementation of this function, if you want to filter the event out, i.e. stop it being handled further, return true; otherwise return false. 0071 */ 0072 bool eventFilter(QObject* iObject, QEvent* iEvent) override; 0073 0074 private Q_SLOTS: 0075 void copy(); 0076 void onActionTriggered(); 0077 void onRangeChanged(); 0078 0079 private: 0080 bool stickH; 0081 bool stickV; 0082 }; 0083 0084 #endif // SKGTABLEWIDGET_H