diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h')
| -rw-r--r-- | SQLiteStudio3/guiSQLiteStudio/sqlcompareview.h | 34 |
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 |
