QAdvanced Item View  0.4
The QAIV (Qt Advanced Item Views) library provides GUI and utility classes extending the capabilities of the Qt item views.
 All Classes Functions Variables Enumerations Enumerator Properties Groups Pages
qtablemodelwriter.h
1 /******************************************************************************
2 ** This file is part of qadvanceditemviews.
3 **
4 ** Copyright (c) 2011-2013 Martin Hoppe martin@2x2hoppe.de
5 **
6 ** qadvanceditemviews is free software: you can redistribute it
7 ** and/or modify it under the terms of the GNU Lesser General
8 ** Public License as published by the Free Software Foundation,
9 ** either version 3 of the License, or (at your option) any
10 ** later version.
11 **
12 ** qadvanceditemviews is distributed in the hope that it will be
13 ** useful, but WITHOUT ANY WARRANTY; without even the implied
14 ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 ** See the GNU General Public License for more details.
16 **
17 ** You should have received a copy of the GNU Lesser General Public
18 ** License along with qadvanceditemviews.
19 ** If not, see <http://www.gnu.org/licenses/>.
20 ******************************************************************************/
21 #ifndef QTABLEMODELWRITER_H
22 #define QTABLEMODELWRITER_H
23 
24 #include <qaivlib_global.h>
25 
26 class QAdvancedTableView;
27 class QTableModelWriterPrivate;
28 class TableView;
29 
31 
43 class QAIVLIBSHARED_EXPORT QTableModelWriter
44 {
45 public:
53  QTableModelWriter(QIODevice* device, const QByteArray & format);
57  QTableModelWriter(const QString & fileName, const QByteArray & format = QByteArray());
58 
60 
61  QIODevice* device() const;
62 
63  QString fileName() const;
64 
65  QByteArray format() const;
66 
67  void setDevice(QIODevice* device);
68 
69  void setFormat(const QByteArray & format);
70 
71  void setIncludeHeader(bool on);
72  void setRole(int role);
73  static QList<QByteArray> supportedFormats();
74 
75  bool writeAll(QAdvancedTableView* view);
76 
77  bool writeAll(QTableView* view);
78 
79  bool writeSelection(QTableView* view);
80 
81  bool writeSelection(QAdvancedTableView* view);
82 private:
83  Q_DISABLE_COPY(QTableModelWriter);
84  bool write(QAdvancedTableView* view, bool all);
85  bool write(QTableView* view, bool all);
86 
87  QTableModelWriterPrivate* d;
88 };
89 
90 #endif // QTABLEMODELWRITER_H
The QTableModelWriter class provides a format-independent interface for writing the content of table ...
Definition: qtablemodelwriter.h:43
The QAdvancedTableView class provides an advanced model/view implementation of a table view...
Definition: qadvancedtableview.h:65