Shows the contents of a file based on the configuration of TagContainer. More...
#include <importfilemodel.h>


Public Member Functions | |
| ImportFileView (QWidget *parent=0, TagContainer *tagContainer=0) | |
| void | setModel (ImportFileProcessorModel *model) |
| ImportFileProcessorModel * | model () |
| ImportFileHeader * | horizontalHeader () |
| TagContainer * | tagContainer () |
| void | dragMoveEvent (QDragMoveEvent *event) |
| void | dragLeaveEvent (QDragLeaveEvent *event) |
| QMenu * | contextMenu () |
| void | setupAsPreviewer (QString &spCode) |
Shows the contents of a file based on the configuration of TagContainer.
| ImportFileView::ImportFileView | ( | QWidget * | parent = 0, |
|
| TagContainer * | tagContainer = 0 | |||
| ) |
: QTableView(parent), m_tagContainer(tagContainer) { if (!m_tagContainer) m_tagContainer = new TagContainer; ImportFileProcessorModel *processorModel = new ImportFileProcessorModel(this); setModel(processorModel); setHorizontalHeader(new ImportFileHeader(this)); menu = new QMenu(this); setAcceptDrops(true); setDragDropMode(QAbstractItemView::DropOnly); setSelectionMode(QAbstractItemView::SingleSelection); setSelectionBehavior(QAbstractItemView::SelectColumns); setupConnections(); }
| QMenu * ImportFileView::contextMenu | ( | ) |
Referenced by setupAsPreviewer().
{return menu;}
| void ImportFileView::dragLeaveEvent | ( | QDragLeaveEvent * | event | ) |
{
selectionModel()->clearSelection();
}
| void ImportFileView::dragMoveEvent | ( | QDragMoveEvent * | event | ) |
{
selectionModel()->select(indexAt(event->pos()), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Columns); //QItemSelectionModel::Columns
}
| ImportFileHeader * ImportFileView::horizontalHeader | ( | ) |
Reimplemented from QTableView.
Referenced by setupAsPreviewer().
{return dynamic_cast<ImportFileHeader*>(QTableView::horizontalHeader());}
| ImportFileProcessorModel * ImportFileView::model | ( | ) |
Referenced by setupAsPreviewer(), and TemplateMakerPageGui::TemplateMakerPageGui().
{return dynamic_cast<ImportFileProcessorModel*>(QTableView::model());}
| void ImportFileView::setModel | ( | ImportFileProcessorModel * | model | ) |
Referenced by ImportFileView().
{QTableView::setModel(model);}
| void ImportFileView::setupAsPreviewer | ( | QString & | spCode | ) |
{
//alle signals NAAR TagContainer disconnecten eerst
horizontalHeader()->disconnect(m_tagContainer);
model()->disconnect(m_tagContainer);
horizontalHeader()->setEnabled(false);
contextMenu()->setEnabled(false);
m_tagContainer->initialize(spCode);
}
| TagContainer * ImportFileView::tagContainer | ( | ) |
{return m_tagContainer;}
1.7.1