From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h (limited to 'SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h') diff --git a/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h new file mode 100644 index 0000000..175e35a --- /dev/null +++ b/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h @@ -0,0 +1,34 @@ +#ifndef SQLCOMPAREVIEW_H +#define SQLCOMPAREVIEW_H + +#include "guiSQLiteStudio_global.h" +#include + +class SqlView; +class diff_match_patch; +class SqliteSyntaxHighlighter; + +class GUI_API_EXPORT SqlCompareView : public QTableWidget +{ + public: + explicit SqlCompareView(QWidget* parent = 0); + + void setSides(const QList>& data); + void setLeftLabel(const QString& label); + void setRightLabel(const QString& label); + void updateSizes(); + + protected: + void resizeEvent(QResizeEvent* e); + void showEvent(QShowEvent* e); + + private: + void updateLabels(); + void setupHighlighting(const QString& left, const QString& right, SqlView* leftView, SqlView* rightView); + + QString leftLabel; + QString rightLabel; + diff_match_patch* diff = nullptr; +}; + +#endif // SQLCOMPAREVIEW_H -- cgit v1.2.3