21#ifndef JKQTPEnhancedTableView_H_INCLUDED
22#define JKQTPEnhancedTableView_H_INCLUDED
23#include "jkqtplotter/jkqtplotter_imexport.h"
24#include "jkqtplotter/jkqtplotter_configmacros.h"
26#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
27# include <QPrintDialog>
52 QString
toHtml(
int borderWidth=1,
bool non_breaking=
false,
int fontSizePt=-1)
const;
53#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
69 void print(QPrinter* printer,
bool onePageWide=
false,
bool onePageHigh=
false);
79 void paint(QPainter& painter, QRect pageRec=QRect());
82#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
88 void keyPressed(
int key, Qt::KeyboardModifiers modifiers,
const QString& text);
104 void copySelectionToCSV(
int copyrole=Qt::EditRole,
bool storeHead=
true,
const QString& separator=
", ",
const QChar& decimalpoint=
'.');
115#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
143#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
144 void paint(QPainter &painter,
double scale,
int page,
double hhh,
double vhw,
const QList<int>& pageCols,
const QList<int>& pageRows, QPrinter* p=
nullptr);
146 void paint(QPainter &painter,
double scale,
int page,
double hhh,
double vhw,
const QList<int>& pageCols,
const QList<int>& pageRows);
148#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
150 QPrinter*
getPrinter(QPrinter* printerIn=
nullptr,
bool *localPrinter=
nullptr);
this class extends the QTableView
Definition jkqtpenhancedtableview.h:45
void copySelectionToCSV(int copyrole=Qt::EditRole, bool storeHead=true, const QString &separator=", ", const QChar &decimalpoint='.')
copy the selected cells' contents to the clipboard as comma separated text
QAction * getActionPrint()
return a QAction that prints the table using the methode print()
Definition jkqtpenhancedtableview.h:84
void paint(QPainter &painter, QRect pageRec=QRect())
draw the contents of the table-view into the given pageRect, using the given painter
QAction * printAction
action that calls print()
Definition jkqtpenhancedtableview.h:152
void keyPressed(int key, Qt::KeyboardModifiers modifiers, const QString &text)
emitted when a key is pressed in the context of this widget
virtual ~JKQTPEnhancedTableView()
void paint(QPainter &painter, double scale, int page, double hhh, double vhw, const QList< int > &pageCols, const QList< int > &pageRows, QPrinter *p=nullptr)
internal paintig method
void print()
print the table contents
void copySelectionToCSVNoHead(int copyrole=Qt::EditRole, const QString &separator=", ", const QChar &decimalpoint='.')
copy the selected cells' contents to the clipboard as comma separated text, without the header
JKQTPEnhancedTableView(QWidget *parent=nullptr)
QString toHtml(int borderWidth=1, bool non_breaking=false, int fontSizePt=-1) const
return the contents of the table view as HTML fragment
QSizeF getTotalSize() const
returns the totoal size of the table-view
QPrinter * getPrinter(QPrinter *printerIn=nullptr, bool *localPrinter=nullptr)
select a printer, using a print-selection dialog if necessary
void copySelectionToExcel(int copyrole=Qt::EditRole, bool storeHead=true)
copy the selected cells' contents to the clipboard, so it can be pasted into Excel
virtual void keyPressEvent(QKeyEvent *event)
handles key presses and reacts to some standard keys
void print(QPrinter *printer, bool onePageWide=false, bool onePageHigh=false)
print the contents of the table view
void copySelectionToExcelNoHead(int copyrole=Qt::EditRole)
copy the selected cells' contents to the clipboard, so it can be pasted into Excel,...
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89