• 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
editorview.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2007-2009 by Nick Shaforostoff <shafff@ukr.net>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License as
8  published by the Free Software Foundation; either version 2 of
9  the License or (at your option) version 3 or any later version
10  accepted by the membership of KDE e.V. (or its successor approved
11  by the membership of KDE e.V.), which shall act as a proxy
12  defined in Section 14 of version 3 of the license.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 **************************************************************************** */
23 
24 #ifndef EDITORVIEW_H
25 #define EDITORVIEW_H
26 
27 #include "pos.h"
28 #include "state.h"
29 #include "catalogstring.h"
30 
31 #include <QSplitter>
32 #include <KUrl>
33 
34 class Catalog;
35 class LedsWidget;
36 class TranslationUnitTextEdit;
37 class KTabBar;
38 class QContextMenuEvent;
39 class QDragEnterEvent;
40 
55 class EditorView: public QSplitter
56 {
57  Q_OBJECT
58 public:
59  EditorView(QWidget *,Catalog*);
60  virtual ~EditorView();
61 
62  KTabBar* tabBar(){return m_pluralTabBar;}//to connect tabbar signals to controller (EditorWindow) slots
63  QString selectionInTarget() const;//for non-batch replace
64  QString selectionInSource() const;
65 
66  QObject* viewPort();
67  void setProperFocus();
68 
69 public slots:
70  void gotoEntry(DocPosition pos=DocPosition(),int selection=0/*, bool updateHistory=true*/);
71  void toggleApprovement();
72  void setState(TargetState);
73  void setEquivTrans(bool);
74 
75 /*
76  void dragEnterEvent(QDragEnterEvent* event);
77  void dropEvent(QDropEvent*);
78 */
79 private:
80  Catalog* m_catalog;
81 
82  TranslationUnitTextEdit * m_sourceTextEdit;
83  TranslationUnitTextEdit * m_targetTextEdit
84 ;
85 
86  KTabBar* m_pluralTabBar;
87  LedsWidget* _leds;
88 
89 public:
90  bool m_modifiedAfterFind;//for F3-search reset
91 
92 signals:
93  void signalEquivTranslatedEntryDisplayed(bool);
94  void signalApprovedEntryDisplayed(bool);
95  void signalChangeStatusbar(const QString&);
96  void signalChanged(uint index); //esp for mergemode...
97  //void fileOpenRequested(KUrl);
98  void binaryUnitSelectRequested(const QString& id);
99  void gotoEntryRequested(const DocPosition&);
100  void tmLookupRequested(DocPosition::Part, const QString&);
101  //void tmLookupRequested(const QString& source, const QString& target);
102  void findRequested();
103  void findNextRequested();
104  void replaceRequested();
105  void doExplicitCompletion();
106 
107 
108 private slots:
109  void settingsChanged();
110  void resetFindForCurrent(const DocPosition& pos);
111 
112  //Edit menu
113  void unwrap(TranslationUnitTextEdit* editor=0);
114  void toggleBookmark(bool);
115  void insertTerm(const QString&);
116 
117 //workaround for qt ctrl+z bug
118 };
119 
120 
121 class KLed;
122 class QLabel;
123 class LedsWidget:public QWidget
124 {
125 Q_OBJECT
126 public:
127  LedsWidget(QWidget* parent);
128 private:
129  void contextMenuEvent(QContextMenuEvent* event);
130 
131 public slots:
132  void cursorPositionChanged(int column);
133 
134 public:
135  KLed* ledFuzzy;
136  KLed* ledUntr;
137  //KLed* ledErr;
138  QLabel* lblColumn;
139 };
140 
141 #endif
EditorView::selectionInSource
QString selectionInSource() const
Definition: editorview.cpp:310
EditorView::findNextRequested
void findNextRequested()
EditorView::gotoEntryRequested
void gotoEntryRequested(const DocPosition &)
EditorView::gotoEntry
void gotoEntry(DocPosition pos=DocPosition(), int selection=0)
Definition: editorview.cpp:177
QWidget
catalogstring.h
LedsWidget
Definition: editorview.h:123
DocPosition::Part
Part
Definition: pos.h:40
EditorView::setState
void setState(TargetState)
Definition: editorview.cpp:350
EditorView::setEquivTrans
void setEquivTrans(bool)
Definition: editorview.cpp:360
LedsWidget::lblColumn
QLabel * lblColumn
Definition: editorview.h:138
pos.h
EditorView::viewPort
QObject * viewPort()
Definition: editorview.cpp:326
EditorView::toggleApprovement
void toggleApprovement()
Definition: editorview.cpp:339
EditorView::signalApprovedEntryDisplayed
void signalApprovedEntryDisplayed(bool)
DocPosition
This struct represents a position in a catalog.
Definition: pos.h:38
EditorView::selectionInTarget
QString selectionInTarget() const
Definition: editorview.cpp:304
EditorView::tmLookupRequested
void tmLookupRequested(DocPosition::Part, const QString &)
EditorView::findRequested
void findRequested()
EditorView::signalChanged
void signalChanged(uint index)
LedsWidget::ledUntr
KLed * ledUntr
Definition: editorview.h:136
QContextMenuEvent
QObject
LedsWidget::cursorPositionChanged
void cursorPositionChanged(int column)
Definition: editorview.cpp:90
LedsWidget::ledFuzzy
KLed * ledFuzzy
Definition: editorview.h:135
QWidget::pos
QPoint pos() const
EditorView::signalEquivTranslatedEntryDisplayed
void signalEquivTranslatedEntryDisplayed(bool)
QString
EditorView::~EditorView
virtual ~EditorView()
Definition: editorview.cpp:144
LedsWidget::LedsWidget
LedsWidget(QWidget *parent)
Definition: editorview.cpp:63
EditorView
This is the main view class for Lokalize Editor.
Definition: editorview.h:55
EditorView::signalChangeStatusbar
void signalChangeStatusbar(const QString &)
EditorView::EditorView
EditorView(QWidget *, Catalog *)
Definition: editorview.cpp:97
QSplitter
TranslationUnitTextEdit
Definition: xlifftextedit.h:37
state.h
QDragEnterEvent
Catalog
This class represents a catalog It uses CatalogStorage interface to work with catalogs in different f...
Definition: catalog.h:74
EditorView::binaryUnitSelectRequested
void binaryUnitSelectRequested(const QString &id)
EditorView::setProperFocus
void setProperFocus()
Definition: editorview.cpp:316
EditorView::m_modifiedAfterFind
bool m_modifiedAfterFind
Definition: editorview.h:90
QLabel
QObject::parent
QObject * parent() const
TargetState
TargetState
Definition: state.h:30
EditorView::tabBar
KTabBar * tabBar()
Definition: editorview.h:62
QWidget::event
virtual bool event(QEvent *event)
EditorView::replaceRequested
void replaceRequested()
EditorView::doExplicitCompletion
void doExplicitCompletion()
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:07 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