qse  0.5.4
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
QseDataExportPreview Class Reference

#include <qsedataexportpreview.h>

Inheritance diagram for QseDataExportPreview:
Inheritance graph

Public Slots

void clear ()
 
int appendNewFile (QString name)
 
void appendLine (int file, QString line)
 
void onDataChanged ()
 

Signals

void dataChanged ()
 

Public Member Functions

 QseDataExportPreview (QseDataExport *exp, QObject *parent=0)
 
 ~QseDataExportPreview ()
 
QString getFile (int n)
 
void setFile (int n, QString nam)
 
int countFiles ()
 
QString getLines (int file)
 

Private Attributes

QseDataExportm_Export
 
QStringList m_Files
 
QStringList m_Contents
 

Detailed Description

Definition at line 6 of file qsedataexportpreview.h.

Constructor & Destructor Documentation

QseDataExportPreview::QseDataExportPreview ( QseDataExport exp,
QObject *  parent = 0 
)

Definition at line 5 of file qsedataexportpreview.cpp.

6  : QObject(parent),
7  m_Export(exp),
8  m_Files(),
9  m_Contents()
10 {
11 }
QseDataExportPreview::~QseDataExportPreview ( )

Definition at line 13 of file qsedataexportpreview.cpp.

14 {
15 }

Member Function Documentation

void QseDataExportPreview::appendLine ( int  file,
QString  line 
)
slot

Definition at line 32 of file qsedataexportpreview.cpp.

References m_Contents.

33 {
34 // printf("QseDataExportPreview::appendLine(%d,\"%s\");\n", file, qPrintable(line));
35 
36  if ((file >= 0) && (file < m_Contents.count())) {
37  m_Contents[file].append(line);
38  m_Contents[file].append("\n");
39  }
40 }
int QseDataExportPreview::appendNewFile ( QString  name)
slot

Definition at line 23 of file qsedataexportpreview.cpp.

References countFiles(), m_Contents, and m_Files.

24 {
25  m_Files.append(name);
26 
27  m_Contents.append("");
28 
29  return countFiles()-1;
30 }
void QseDataExportPreview::clear ( )
slot

Definition at line 17 of file qsedataexportpreview.cpp.

References m_Contents, and m_Files.

18 {
19  m_Files.clear();
20  m_Contents.clear();
21 }
int QseDataExportPreview::countFiles ( )

Definition at line 52 of file qsedataexportpreview.cpp.

References m_Files.

Referenced by appendNewFile().

53 {
54  return m_Files.count();
55 }
void QseDataExportPreview::dataChanged ( )
signal

Referenced by onDataChanged().

QString QseDataExportPreview::getFile ( int  n)

Definition at line 42 of file qsedataexportpreview.cpp.

References m_Files.

Referenced by QseDataExportPreviewUI::onDataChanged().

43 {
44  return m_Files[n];
45 }
QString QseDataExportPreview::getLines ( int  file)

Definition at line 57 of file qsedataexportpreview.cpp.

References m_Contents.

58 {
59  return m_Contents[file];
60 }
void QseDataExportPreview::onDataChanged ( )
slot

Definition at line 62 of file qsedataexportpreview.cpp.

References dataChanged().

63 {
64  emit dataChanged();
65 }
void QseDataExportPreview::setFile ( int  n,
QString  nam 
)

Definition at line 47 of file qsedataexportpreview.cpp.

References m_Files.

48 {
49  m_Files[n] = nam;
50 }

Member Data Documentation

QStringList QseDataExportPreview::m_Contents
private

Definition at line 32 of file qsedataexportpreview.h.

Referenced by appendLine(), appendNewFile(), clear(), and getLines().

QseDataExport* QseDataExportPreview::m_Export
private

Definition at line 30 of file qsedataexportpreview.h.

QStringList QseDataExportPreview::m_Files
private

Definition at line 31 of file qsedataexportpreview.h.

Referenced by appendNewFile(), clear(), countFiles(), getFile(), and setFile().


The documentation for this class was generated from the following files: