Printing support #1525: print tables in Browse Data and Execute SQL tabs

Added contextual menu entry and keyboard shortcut for printing the browsed
table with headers. If a region is selected, print those cells data.
Otherwise, print the entire table.

The HTML conversion used for clipboard is reused. Borders are added for
better visual output.
This commit is contained in:
mgr
2018-09-23 18:26:57 +02:00
parent 99c53a436e
commit 4b34eb76b5
2 changed files with 60 additions and 4 deletions

View File

@@ -8,6 +8,7 @@
#include <QStyledItemDelegate>
class QMenu;
class QMimeData;
class FilterTableHeader;
namespace sqlb { class ObjectIdentifier; }
@@ -50,9 +51,11 @@ signals:
void selectedRowsToBeDeleted();
private:
void copyMimeData(const QModelIndexList& fromIndices, QMimeData* mimeData, const bool withHeaders, const bool inSQL);
void copy(const bool withHeaders, const bool inSQL);
void paste();
QString escapeCopiedData(const QByteArray& data) const;
void openPrintDialog();
void useAsFilter(const QString& filterOperator, bool binary = false);
void duplicateUpperCell();