Skip to content

Commit

Permalink
Partially fixes the build of the gqb plugin on pgModeler 1.1.x. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhaotix committed Nov 22, 2023
1 parent c545d7d commit f693679
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 32 deletions.
8 changes: 4 additions & 4 deletions graphicalquerybuilder/graphicalquerybuilder.pro
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ equals(GQB_JOIN_SOLVER, "y"){
DEFINES += "GRAPHICAL_QUERY_BUILDER_JOIN_SOLVER"
HEADERS += src/graphicalquerybuilderjoinsolver.h
SOURCES += src/graphicalquerybuilderjoinsolver.cpp
INCLUDEPATH += $$PWD/paal/include
$$PWD/paal/boost
DEPENDPATH += $$PWD/paal/include
$$PWD/paal/boost
INCLUDEPATH += $$absolute_path($$PWD/paal/include) \
$$absolute_path($$PWD/paal/boost)
DEPENDPATH += $$absolute_path($$PWD/paal/include) \
$$absolute_path($$PWD/paal/boost)
}
#------------------------------------------------------------------------------------------------

Expand Down
40 changes: 23 additions & 17 deletions graphicalquerybuilder/src/graphicalquerybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,52 @@
#include "exception.h"
#include "messagebox.h"
#include "mainwindow.h"
#include "guiutilsns.h"

GraphicalQueryBuilder::GraphicalQueryBuilder(void)
GraphicalQueryBuilder::GraphicalQueryBuilder()
{
configurePluginInfo(getPluginTitle(),
getPluginVersion(),
getPluginAuthor(),
getPluginDescription(),

GlobalAttributes::getPluginsDir() +
GlobalAttributes::DirSeparator +
QString("graphicalquerybuilder") +
GlobalAttributes::DirSeparator + QString("graphicalquerybuilder.png"));
getPluginVersion(),
getPluginAuthor(),
getPluginDescription());

is_plugin_active=false;
}

QString GraphicalQueryBuilder::getPluginTitle(void)
QString GraphicalQueryBuilder::getPluginTitle() const
{
return(tr("Graphical query builder"));
}


QString GraphicalQueryBuilder::getPluginVersion(void)
QString GraphicalQueryBuilder::getPluginVersion() const
{
return(QString("0.9.2"));
return(QString("0.1.0"));
}

QString GraphicalQueryBuilder::getPluginAuthor(void)
QString GraphicalQueryBuilder::getPluginAuthor() const
{
return(QString("Maxime Chambonnet [email protected]"));
}

QString GraphicalQueryBuilder::getPluginDescription(void)
QString GraphicalQueryBuilder::getPluginDescription() const
{
return(tr("Check documentation, source code and report bugs at : \
\n https://www.github.com/pgmodeler/plugins/graphicalquerybuilder \
\n https://www.gitlab.com/maxzor/pgmodeler_gqb"));
}

void GraphicalQueryBuilder::showPluginInfo(void)
QAction *GraphicalQueryBuilder::getAction(ActionId act_id) const
{
return nullptr;
}

QToolButton *GraphicalQueryBuilder::getToolButton() const
{
return nullptr;
}

void GraphicalQueryBuilder::showPluginInfo()
{
plugin_info_frm->show();
}
Expand Down Expand Up @@ -246,12 +252,12 @@ void GraphicalQueryBuilder::adjustViewportToItems(QList<BaseObjectView *> items)
}


QKeySequence GraphicalQueryBuilder::getPluginShortcut(void)
QKeySequence GraphicalQueryBuilder::getPluginShortcut()
{
return(QKeySequence(QString("Ctrl+J")));
}

bool GraphicalQueryBuilder::hasMenuAction(void)
bool GraphicalQueryBuilder::hasMenuAction()
{
return(false);
}
24 changes: 14 additions & 10 deletions graphicalquerybuilder/src/graphicalquerybuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,20 @@ class GraphicalQueryBuilder: public QObject, public PgModelerPlugin {
GraphicalQueryBuilderPathWidget *gqb_path_wgt;

public:
GraphicalQueryBuilder(void);

QString getPluginTitle(void);
QString getPluginVersion(void);
QString getPluginAuthor(void);
QString getPluginDescription(void);
QKeySequence getPluginShortcut(void);
bool hasMenuAction(void);
void executePlugin(ModelWidget *model_wgt);
void initPlugin(MainWindow *main_window);
GraphicalQueryBuilder();

QString getPluginTitle() const override;
QString getPluginVersion() const override;
QString getPluginAuthor() const override;
QString getPluginDescription() const override;

QAction *getAction(ActionId act_id) const override;
QToolButton *getToolButton() const override;

QKeySequence getPluginShortcut();
bool hasMenuAction();
void executePlugin(ModelWidget *model_wgt);
void initPlugin(MainWindow *main_window) override;

private slots:
void handleModelChange(ModelWidget *new_model);
Expand Down
1 change: 1 addition & 0 deletions graphicalquerybuilder/src/graphicalquerybuildersqlwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "ui_graphicalquerybuildersqlwidget.h"
#include "dbobjects/baseobjectwidget.h"
#include "widgets/numberedtexteditor.h"
#include "utils/syntaxhighlighter.h"

class GraphicalQueryBuilderSQLWidget: public BaseObjectWidget, public Ui::GraphicalQueryBuilderSqlWidget {
private:
Expand Down
8 changes: 7 additions & 1 deletion plugins.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,11 @@ include(plugins.pri)
TEMPLATE = subdirs
SUBDIRS += sampleplugin

# GQB plugin temporarily disabled due to problems in compilation process
# Graphical Query Builder plugin is temporarily disabled due to problems in compilation process.
# Currently only the graphical query builder portion can be compiled. The path solver code is failing to build.
# Uncomment the line "SUBDIRS+=..." below if you want to try to build and eventually fix the build process.
#
# Building instructions here:
# >> https://github.com/pgmodeler/plugins/blob/develop/graphicalquerybuilder/README.md

# SUBDIRS += graphicalquerybuilder

0 comments on commit f693679

Please sign in to comment.