• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

lokalize

Public Types | Public Slots | Signals | Public Member Functions | List of all members
ProjectModel Class Reference

#include <projectmodel.h>

Inheritance diagram for ProjectModel:
Inheritance graph
[legend]

Public Types

enum  AdditionalRoles {
  FuzzyUntrCountRole = Qt::UserRole, FuzzyCountRole, UntransCountRole, TemplateOnlyRole,
  TransOnlyRole, TotalRole
}
 
enum  ProjectModelColumns {
  FileName, Graph, TotalCount, TranslatedCount,
  FuzzyCount, UntranslatedCount, SourceDate, TranslationDate,
  LastTranslator, ProjectModelColumnCount
}
 

Public Slots

void slotFileSaved (const KUrl &)
 

Signals

void loading ()
 
void totalsChanged (int fuzzy, int translated, int untranslated, bool done)
 

Public Member Functions

 ProjectModel (QObject *parent)
 
 ~ProjectModel ()
 
KUrl beginEditing (const QModelIndex &index)
 
bool canFetchMore (const QModelIndex &parent) const
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
void fetchMore (const QModelIndex &parent)
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
QModelIndex indexForUrl (const KUrl &url)
 
KFileItem itemForIndex (const QModelIndex &index) const
 
QModelIndex parent (const QModelIndex &index) const
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
void setCompleteScan (bool enable)
 
void setUrl (const KUrl &poUrl, const KUrl &potUrl)
 
ThreadWeaver::Weaver * weaver ()
 

Detailed Description

Some notes: Uses two KDirModels for template and translations dir.

Listens to their signals and constructs a combined model. Stats calculation: Uses threadweawer for stats calculation. Each job analyzes files in one dir and adds subdirs to queue. A change in one file forces whole dir to be rescanned The job priority needs some tweaking.

Definition at line 54 of file projectmodel.h.

Member Enumeration Documentation

enum ProjectModel::AdditionalRoles
Enumerator
FuzzyUntrCountRole 
FuzzyCountRole 
UntransCountRole 
TemplateOnlyRole 
TransOnlyRole 
TotalRole 

Definition at line 134 of file projectmodel.h.

enum ProjectModel::ProjectModelColumns
Enumerator
FileName 
Graph 
TotalCount 
TranslatedCount 
FuzzyCount 
UntranslatedCount 
SourceDate 
TranslationDate 
LastTranslator 
ProjectModelColumnCount 

Definition at line 120 of file projectmodel.h.

Constructor & Destructor Documentation

ProjectModel::ProjectModel ( QObject *  parent)

Definition at line 51 of file projectmodel.cpp.

ProjectModel::~ProjectModel ( )

Definition at line 99 of file projectmodel.cpp.

Member Function Documentation

KUrl ProjectModel::beginEditing ( const QModelIndex &  index)

Definition at line 158 of file projectmodel.cpp.

bool ProjectModel::canFetchMore ( const QModelIndex &  parent) const

Definition at line 567 of file projectmodel.cpp.

int ProjectModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 513 of file projectmodel.cpp.

QVariant ProjectModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

we use QRect to pass data through QVariant tunnel

order is tran, untr, fuzzy left() top() width()

Definition at line 611 of file projectmodel.cpp.

void ProjectModel::fetchMore ( const QModelIndex &  parent)

Definition at line 579 of file projectmodel.cpp.

Qt::ItemFlags ProjectModel::flags ( const QModelIndex &  index) const

Definition at line 540 of file projectmodel.cpp.

bool ProjectModel::hasChildren ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 555 of file projectmodel.cpp.

QVariant ProjectModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Definition at line 519 of file projectmodel.cpp.

QModelIndex ProjectModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

Definition at line 688 of file projectmodel.cpp.

QModelIndex ProjectModel::indexForUrl ( const KUrl &  url)

Definition at line 757 of file projectmodel.cpp.

KFileItem ProjectModel::itemForIndex ( const QModelIndex &  index) const

Definition at line 701 of file projectmodel.cpp.

void ProjectModel::loading ( )
signal
QModelIndex ProjectModel::parent ( const QModelIndex &  index) const

Definition at line 773 of file projectmodel.cpp.

int ProjectModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 549 of file projectmodel.cpp.

void ProjectModel::setCompleteScan ( bool  enable)
inline

Definition at line 168 of file projectmodel.h.

void ProjectModel::setUrl ( const KUrl &  poUrl,
const KUrl &  potUrl 
)

Definition at line 112 of file projectmodel.cpp.

void ProjectModel::slotFileSaved ( const KUrl &  url)
slot

Definition at line 1067 of file projectmodel.cpp.

void ProjectModel::totalsChanged ( int  fuzzy,
int  translated,
int  untranslated,
bool  done 
)
signal
ThreadWeaver::Weaver* ProjectModel::weaver ( )
inline

Definition at line 167 of file projectmodel.h.


The documentation for this class was generated from the following files:
  • projectmodel.h
  • projectmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:03:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

lokalize

Skip menu "lokalize"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal