Allowed to add custom buttons/widget to grid toolbar.

Add possibility to hide plugin from navigation bar.
master
Josef Rokos 8 years ago
parent fe5eac9cd9
commit 8814a0e2a1

@ -54,6 +54,11 @@ QTableView *IGridForm::tableView()
return ui->tableView; return ui->tableView;
} }
QWidget *IGridForm::toolbar()
{
return ui->widget;
}
void IGridForm::hideColumns(const QList<int> &cols) void IGridForm::hideColumns(const QList<int> &cols)
{ {
foreach (int col, cols) { foreach (int col, cols) {

@ -6,6 +6,7 @@
#include <QTableView> #include <QTableView>
#include <QMenu> #include <QMenu>
#include <QList> #include <QList>
#include <QWidget>
#include "columndialog.h" #include "columndialog.h"
#include "filterui.h" #include "filterui.h"
@ -27,6 +28,7 @@ public:
void setPluginId(const QString &pluginId); void setPluginId(const QString &pluginId);
QString pluginId(); QString pluginId();
QTableView *tableView(); QTableView *tableView();
QWidget *toolbar();
virtual void setTranslations(const QMap<QString, QString> &translations) = 0; virtual void setTranslations(const QMap<QString, QString> &translations) = 0;
signals: signals:

@ -75,6 +75,7 @@ public:
return (Service<T>*)m_service; return (Service<T>*)m_service;
} }
virtual bool showIcon() { return true; }
virtual QTranslator* translator() { return NULL; } virtual QTranslator* translator() { return NULL; }
virtual QIcon pluginIcon() { return QIcon(); } virtual QIcon pluginIcon() { return QIcon(); }
QMap<QString, QString> translations() { return m_translations; } QMap<QString, QString> translations() { return m_translations; }

Loading…
Cancel
Save