summaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h')
-rw-r--r--SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h34
1 files changed, 34 insertions, 0 deletions
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 <QTableWidget>
+
+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<QPair<QString,QString>>& 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