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

#include <qsedataexportpreviewui.h>

Inheritance diagram for QseDataExportPreviewUI:
Inheritance graph

Public Slots

void onDataChanged ()
 

Public Member Functions

 QseDataExportPreviewUI (QseDataExportPreview *preview, QWidget *parent=0)
 

Private Attributes

QseDataExportPreviewm_Preview
 

Detailed Description

Definition at line 7 of file qsedataexportpreviewui.h.

Constructor & Destructor Documentation

QseDataExportPreviewUI::QseDataExportPreviewUI ( QseDataExportPreview preview,
QWidget *  parent = 0 
)

Definition at line 4 of file qsedataexportpreviewui.cpp.

References m_Preview, and onDataChanged().

5  : QDialog(parent),
6  m_Preview(preview)
7 {
8  setupUi(this);
9 
10  connect(m_Preview, SIGNAL(dataChanged()), this, SLOT(onDataChanged()));
11 }
QseDataExportPreview * m_Preview

Member Function Documentation

void QseDataExportPreviewUI::onDataChanged ( )
slot

Definition at line 13 of file qsedataexportpreviewui.cpp.

References QseDataExportPreview::getFile(), and m_Preview.

Referenced by QseDataExportPreviewUI().

14 {
15  int nfiles = m_Preview -> countFiles();
16  int ntabs = m_PreviewTabs -> count();
17 
18  for (int i=ntabs; i>0; i--) {
19  QWidget *w = m_PreviewTabs -> widget(i);
20  m_PreviewTabs -> removeTab(i);
21  delete w;
22  }
23 
24  m_PreviewTabs -> clear();
25 
26  for (int i=0; i<nfiles; i++) {
27  QTextEdit *t = new QTextEdit();
28 
29  t -> setObjectName(m_Preview->getFile(i));
30  t -> setReadOnly(true);
31  t -> setLineWrapMode(QTextEdit::NoWrap);
32 
33 #ifdef __qse_fink
34  QString txt = m_Preview -> getLines(i);
35  txt.replace(QString("\t"),QString(" "));
36  t -> setPlainText(txt);
37 #else
38  t -> setPlainText(m_Preview -> getLines(i));
39 #endif
40 
41  m_PreviewTabs -> addTab(t, m_Preview->getFile(i));
42  }
43 }
QseDataExportPreview * m_Preview

Member Data Documentation

QseDataExportPreview* QseDataExportPreviewUI::m_Preview
private

Definition at line 18 of file qsedataexportpreviewui.h.

Referenced by onDataChanged(), and QseDataExportPreviewUI().


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