• 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
  • project
projecttab.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 PROJECTTAB_H
25 #define PROJECTTAB_H
26 
27 #include "lokalizesubwindowbase.h"
28 
29 #include <KMainWindow>
30 #include <KUrl>
31 
32 #include <KXMLGUIClient>
33 
34 class QStackedLayout;
35 class ProjectWidget;
36 class KLineEdit;
37 class QContextMenuEvent;
38 class QProgressBar;
39 
43 class ProjectTab: public LokalizeSubwindowBase2
44 {
45  Q_OBJECT
46  Q_CLASSINFO("D-Bus Interface", "org.kde.Lokalize.ProjectOverview")
47  //qdbuscpp2xml -m -s projecttab.h -o org.kde.lokalize.ProjectOverview.xml
48 
49 public:
50  ProjectTab(QWidget *parent);
51  ~ProjectTab();
52 
53  void contextMenuEvent(QContextMenuEvent *event);
54 
55  void hideDocks(){};
56  void showDocks(){};
57  KXMLGUIClient* guiClient(){return (KXMLGUIClient*)this;}
58  KUrl currentUrl();
59 
60  int unitsCount(){return m_currentUnitsCount;}
61  void setLegacyUnitsCount(int to);
62 
63 signals:
64  void projectOpenRequested(QString path=QString());
65 
66  void fileOpenRequested(const KUrl&);
67 
68  void searchRequested(const QStringList&);
69  void searchRequested(const KUrl::List&);
70  void replaceRequested(const KUrl::List&);
71  void spellcheckRequested(const KUrl::List&);
72 
73 public slots:
74  Q_SCRIPTABLE void setCurrentItem(const QString& url);
75  Q_SCRIPTABLE QString currentItem() const;
77  Q_SCRIPTABLE QStringList selectedItems() const;
78  Q_SCRIPTABLE bool currentItemIsTranslationFile() const;
79  void showRealProjectOverview();
80 
81  //Q_SCRIPTABLE bool isShown() const;
82 
83 private slots:
84  void setFilterRegExp();
85  void setFocus();
86  void scanFilesToTM();
87  void searchInFiles(bool templ=false);
88  void searchInFilesInclTempl();
89  void openFile();
90  void findInFiles();
91  void replaceInFiles();
92  void spellcheckFiles();
93 
94  void gotoPrevFuzzyUntr();
95  void gotoNextFuzzyUntr();
96  void gotoPrevFuzzy();
97  void gotoNextFuzzy();
98  void gotoPrevUntranslated();
99  void gotoNextUntranslated();
100  void gotoPrevTemplateOnly();
101  void gotoNextTemplateOnly();
102  void gotoPrevTransOnly();
103  void gotoNextTransOnly();
104 
105  void updateStatusBar(int fuzzy = 0, int translated = 0, int untranslated = 0, bool done = false);
106  void initStatusBarProgress();
107 
108 private:
109  ProjectWidget* m_browser;
110  KLineEdit* m_filterEdit;
111  QProgressBar* m_progressBar;
112 
113  QStackedLayout *m_stackedLayout;
114 
115  int m_legacyUnitsCount, m_currentUnitsCount;
116 };
117 
118 #endif
QProgressBar
ProjectTab::currentItem
Q_SCRIPTABLE QString currentItem() const
Definition: projecttab.cpp:314
QWidget
ProjectTab::showDocks
void showDocks()
Definition: projecttab.h:56
KXMLGUIClient
lokalizesubwindowbase.h
ProjectTab::contextMenuEvent
void contextMenuEvent(QContextMenuEvent *event)
Definition: projecttab.cpp:229
ProjectTab::setLegacyUnitsCount
void setLegacyUnitsCount(int to)
Definition: projecttab.cpp:353
ProjectTab::showRealProjectOverview
void showRealProjectOverview()
Definition: projecttab.cpp:202
ProjectTab::selectedItems
Q_SCRIPTABLE QStringList selectedItems() const
Definition: projecttab.cpp:315
ProjectTab::spellcheckRequested
void spellcheckRequested(const KUrl::List &)
ProjectTab::unitsCount
int unitsCount()
Definition: projecttab.h:60
ProjectTab::projectOpenRequested
void projectOpenRequested(QString path=QString())
ProjectTab::~ProjectTab
~ProjectTab()
Definition: projecttab.cpp:197
ProjectTab::searchRequested
void searchRequested(const QStringList &)
QContextMenuEvent
ProjectTab::hideDocks
void hideDocks()
Definition: projecttab.h:55
ProjectTab::guiClient
KXMLGUIClient * guiClient()
Definition: projecttab.h:57
QString
QStringList
ProjectTab
Project Overview Tab.
Definition: projecttab.h:43
ProjectTab::fileOpenRequested
void fileOpenRequested(const KUrl &)
ProjectTab::currentUrl
KUrl currentUrl()
Definition: projecttab.cpp:207
ProjectTab::ProjectTab
ProjectTab(QWidget *parent)
Definition: projecttab.cpp:50
QStackedLayout
ProjectWidget
This class is considered a 'view', and ProjectWindow + ProjectView are its controllers the data is pr...
Definition: projectwidget.h:41
ProjectTab::currentItemIsTranslationFile
Q_SCRIPTABLE bool currentItemIsTranslationFile() const
Definition: projecttab.cpp:312
ProjectTab::setCurrentItem
Q_SCRIPTABLE void setCurrentItem(const QString &url)
Definition: projecttab.cpp:313
LokalizeSubwindowBase2
C++ casting workaround.
Definition: lokalizesubwindowbase.h:70
ProjectTab::replaceRequested
void replaceRequested(const KUrl::List &)
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