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

lokalize

  • sources
  • kde-4.14
  • kdesdk
  • lokalize
  • src
  • catalog
catalog_private.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3  This file is based on the one from KBabel
4 
5  Copyright (C) 1999-2000 by Matthias Kiefer <matthias.kiefer@gmx.de>
6  2001-2004 by Stanislav Visnovsky <visnovsky@kde.org>
7  2007 by Nick Shaforostoff <shafff@ukr.net>
8 
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 
24  In addition, as a special exception, the copyright holders give
25  permission to link the code of this program with any edition of
26  the Qt library by Trolltech AS, Norway (or with modified versions
27  of Qt that use the same license as Qt), and distribute linked
28  combinations including the two. You must obey the GNU General
29  Public License in all respects for all of the code used other than
30  Qt. If you modify this file, you may extend this exception to
31  your version of the file, but you are not obligated to do so. If
32  you do not wish to do so, delete this exception statement from
33  your version.
34 
35 **************************************************************************** */
36 
37 #ifndef CATALOGPRIVATE_H
38 #define CATALOGPRIVATE_H
39 
40 #include "projectlocal.h"
41 #include "state.h"
42 #include "pos.h"
43 #include "alttrans.h"
44 
45 #include <kurl.h>
46 #include <kautosavefile.h>
47 
48 #include <QList>
49 #include <QLinkedList>
50 #include <QStringList>
51 #include <QVector>
52 #include <QMap>
53 #include <QSet>
54 #include <QTimer>
55 
56 class QTextCodec;
57 class CatalogStorage;
58 class Catalog;
59 
60 class CatalogPrivate
61 {
62 
63 public:
64 
66  KUrl _url;
67  QString _packageName;
68  QString _packageDir;
69 
71  QString _importID;
72  QString _mimeTypes;
73 
74  QTextCodec *fileCodec;
75 
76  QString _emptyStr;
77 
78  int _numberOfPluralForms;
79 
80  QTimer _autoSaveTimer;
81  KAutoSaveFile* _autoSave;
82  bool _autoSaveDirty;
83  bool _autoSaveRecovered;
84 
85  bool _readOnly;
86  //for wrapping
87  short _maxLineLength;
88 
89  QLinkedList<int> _nonApprovedIndex;
90  QLinkedList<int> _emptyIndex;
91  QLinkedList<int> _errorIndex;
92 
93  QLinkedList<int> _bookmarkIndex;
94 
95  QVector< QLinkedList<int> > _statesIndex;
96 
97 
98  QLinkedList<Catalog*> _altTransCatalogs;
99  QMap<int, AltTrans> _altTranslations;
100 
101  //for undo/redo
102  //keeps pos of the entry that was last modified
103  DocPosition _lastModifiedPos;
104 
105  QSet<DocPos> _modifiedEntries;//just for the nice gui
106 
107  QString _phase;
108  ProjectLocal::PersonRole _phaseRole;
109 
110  explicit CatalogPrivate(QObject* parent)
111  : _mimeTypes( "text/plain" )
112  , fileCodec(0)
113  , _numberOfPluralForms(-1)
114  , _autoSave(new KAutoSaveFile(parent))
115  , _autoSaveDirty(true)
116  , _autoSaveRecovered(false)
117  , _readOnly(false)
118  , _phaseRole(ProjectLocal::Undefined)
119  {
120  _statesIndex.resize(StateCount);
121  }
122 
123  bool addToEmptyIndexIfAppropriate(CatalogStorage*, const DocPosition& pos, bool alreadyEmpty);
124  bool removeFromUntransIndexIfAppropriate(CatalogStorage*, const DocPosition& pos);
125 };
126 
127 
128 #endif //CatalogPrivate_H
CatalogPrivate::_phase
QString _phase
Definition: catalog_private.h:107
ProjectLocal::PersonRole
PersonRole
Definition: projectlocal.h:13
CatalogPrivate::removeFromUntransIndexIfAppropriate
bool removeFromUntransIndexIfAppropriate(CatalogStorage *, const DocPosition &pos)
Definition: catalog.cpp:818
CatalogPrivate::_errorIndex
QLinkedList< int > _errorIndex
Definition: catalog_private.h:91
CatalogPrivate::CatalogPrivate
CatalogPrivate(QObject *parent)
Definition: catalog_private.h:110
CatalogPrivate::_modifiedEntries
QSet< DocPos > _modifiedEntries
Definition: catalog_private.h:105
CatalogPrivate::_bookmarkIndex
QLinkedList< int > _bookmarkIndex
Definition: catalog_private.h:93
CatalogPrivate::_mimeTypes
QString _mimeTypes
Definition: catalog_private.h:72
CatalogPrivate::_numberOfPluralForms
int _numberOfPluralForms
Definition: catalog_private.h:78
pos.h
QMap< int, AltTrans >
CatalogPrivate::_url
KUrl _url
url of the po-file, that belongs to this catalog
Definition: catalog_private.h:66
CatalogPrivate::_autoSave
KAutoSaveFile * _autoSave
Definition: catalog_private.h:81
CatalogPrivate::_phaseRole
ProjectLocal::PersonRole _phaseRole
Definition: catalog_private.h:108
alttrans.h
CatalogPrivate::_emptyIndex
QLinkedList< int > _emptyIndex
Definition: catalog_private.h:90
CatalogPrivate::_nonApprovedIndex
QLinkedList< int > _nonApprovedIndex
Definition: catalog_private.h:89
DocPosition
This struct represents a position in a catalog.
Definition: pos.h:38
QLinkedList< int >
CatalogPrivate::fileCodec
QTextCodec * fileCodec
Definition: catalog_private.h:74
CatalogPrivate::_packageName
QString _packageName
Definition: catalog_private.h:67
QVector::resize
void resize(int size)
QTimer
QObject
CatalogPrivate::_lastModifiedPos
DocPosition _lastModifiedPos
Definition: catalog_private.h:103
StateCount
Definition: state.h:42
projectlocal.h
QSet< DocPos >
CatalogPrivate::_autoSaveTimer
QTimer _autoSaveTimer
Definition: catalog_private.h:80
QString
CatalogPrivate::_emptyStr
QString _emptyStr
Definition: catalog_private.h:76
QTextCodec
CatalogStorage
Abstract interface for storage of translation file.
Definition: catalogstorage.h:45
CatalogPrivate::_packageDir
QString _packageDir
Definition: catalog_private.h:68
CatalogPrivate::_importID
QString _importID
identification string for used import filter
Definition: catalog_private.h:71
CatalogPrivate::addToEmptyIndexIfAppropriate
bool addToEmptyIndexIfAppropriate(CatalogStorage *, const DocPosition &pos, bool alreadyEmpty)
Definition: catalog.cpp:795
state.h
QVector
CatalogPrivate::_maxLineLength
short _maxLineLength
Definition: catalog_private.h:87
ProjectLocal
Definition: projectlocal.h:10
CatalogPrivate::_altTranslations
QMap< int, AltTrans > _altTranslations
Definition: catalog_private.h:99
CatalogPrivate::_autoSaveRecovered
bool _autoSaveRecovered
Definition: catalog_private.h:83
CatalogPrivate::_statesIndex
QVector< QLinkedList< int > > _statesIndex
Definition: catalog_private.h:95
CatalogPrivate::_readOnly
bool _readOnly
Definition: catalog_private.h:85
Catalog
This class represents a catalog It uses CatalogStorage interface to work with catalogs in different f...
Definition: catalog.h:74
CatalogPrivate
Definition: catalog_private.h:60
CatalogPrivate::_altTransCatalogs
QLinkedList< Catalog * > _altTransCatalogs
Definition: catalog_private.h:98
CatalogPrivate::_autoSaveDirty
bool _autoSaveDirty
Definition: catalog_private.h:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:06 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
  • 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