1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 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
|