diff options
| author | 2014-12-06 17:33:25 -0500 | |
|---|---|---|
| committer | 2014-12-06 17:33:25 -0500 | |
| commit | 7167ce41b61d2ba2cdb526777a4233eb84a3b66a (patch) | |
| tree | a35c14143716e1f2c98f808c81f89426045a946f /Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h | |
Imported Upstream version 2.99.6upstream/2.99.6
Diffstat (limited to 'Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h')
| -rw-r--r-- | Plugins/SqlFormatterSimple/sqlformattersimpleplugin.h | 38 |
1 files changed, 38 insertions, 0 deletions
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 <QObject>
+
+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
|
