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 --- .../SqlFormatterSimple/sqlformattersimpleplugin.h | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h (limited to 'Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h') diff --git a/Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h b/Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h new file mode 100644 index 0000000..dde25c8 --- /dev/null +++ b/Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h @@ -0,0 +1,38 @@ +#ifndef SQLFORMATTERSIMPLEPLUGIN_H +#define SQLFORMATTERSIMPLEPLUGIN_H + +#include "sqlformattersimple_global.h" +#include "plugins/sqlformatterplugin.h" +#include "config_builder.h" +#include "plugins/genericplugin.h" +#include "plugins/uiconfiguredplugin.h" +#include + +CFG_CATEGORIES(SqlFormatterSimpleConfig, + CFG_CATEGORY(SqlFormatterSimple, + CFG_ENTRY(bool, UpperCaseKeywords, true) + CFG_ENTRY(bool, TrimLongSpaces, true) + ) +) + +class SQLFORMATTERSIMPLESHARED_EXPORT SqlFormatterSimplePlugin : public GenericPlugin, public SqlFormatterPlugin, public UiConfiguredPlugin +{ + Q_OBJECT + SQLITESTUDIO_PLUGIN("sqlformattersimple.json") + + public: + SqlFormatterSimplePlugin(); + + QString format(SqliteQueryPtr query); + bool init(); + void deinit(); + QString getConfigUiForm() const; + CfgMain* getMainUiConfig(); + void configDialogOpen(); + void configDialogClosed(); + + private: + CFG_LOCAL_PERSISTABLE(SqlFormatterSimpleConfig, cfg) +}; + +#endif // SQLFORMATTERSIMPLEPLUGIN_H -- cgit v1.2.3