1 #pragma once 2 3 #ifndef TCOLUMNHANDLE_H 4 #define TCOLUMNHANDLE_H 5 6 #include <QObject> 7 #include "tcommon.h" 8 9 #undef DVAPI 10 #undef DVVAR 11 #ifdef TOONZLIB_EXPORTS 12 #define DVAPI DV_EXPORT_API 13 #define DVVAR DV_EXPORT_VAR 14 #else 15 #define DVAPI DV_IMPORT_API 16 #define DVVAR DV_IMPORT_VAR 17 #endif 18 19 // forward declaration 20 class TXshColumn; 21 22 //============================================================================= 23 // TColumnHandle 24 //----------------------------------------------------------------------------- 25 26 class DVAPI TColumnHandle final : public QObject { 27 Q_OBJECT 28 29 TXshColumn *m_column; 30 int m_columnIndex; 31 32 public: 33 TColumnHandle(); 34 ~TColumnHandle(); 35 36 TXshColumn *getColumn() const; 37 void setColumn(TXshColumn *column); 38 getColumnIndex()39 int getColumnIndex() const { return m_columnIndex; } 40 void setColumnIndex(int index); 41 notifyColumnIndexSwitched()42 void notifyColumnIndexSwitched() { emit columnIndexSwitched(); } 43 signals: 44 45 void columnIndexSwitched(); 46 }; 47 48 #endif // TCOLUMNHANDLE_H 49