• 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
  • prefs
prefs.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 PREFS_H
25 #define PREFS_H
26 
27 #include <QLineEdit>
28 class KEditListBox;
29 class KLienEdit;
30 
31 namespace Kross {class ActionCollectionView;}
32 
36 class SettingsController: public QObject
37 {
38  Q_OBJECT
39 
40 public:
41  SettingsController();
42  ~SettingsController();
43 
44  bool dirty;
45 
46  void setMainWindowPtr(QWidget* w){m_mainWindowPtr=w;}
47  QWidget* mainWindowPtr(){return m_mainWindowPtr;}
48 
49 public slots:
50  void showSettingsDialog();
51 
52  bool ensureProjectIsLoaded();
53  QString projectOpen(QString path=QString(), bool doOpen=true);
54  bool projectCreate();
55  void projectConfigure();
56 
57  void reflectProjectConfigChange();
58 
59  void reflectRelativePathsHack();
60 
61 signals:
62  void generalSettingsChanged();
63 
64 private:
65  KEditListBox* m_scriptsRelPrefWidget; //HACK to get relative filenames in the project file
66  KEditListBox* m_scriptsPrefWidget;
67  Kross::ActionCollectionView* m_projectActionsView;
68  QWidget* m_mainWindowPtr;
69 
70 private:
71  static SettingsController* _instance;
72  static void cleanupSettingsController();
73 public:
74  static SettingsController* instance();
75 };
76 
81 class RelPathSaver: public QLineEdit
82 {
83 Q_OBJECT
84 public:
85  RelPathSaver(QWidget* p):QLineEdit(p){}
86 public slots:
87  void setText(const QString&);
88 };
89 
90 
95 class LangCodeSaver: public QLineEdit
96 {
97 Q_OBJECT
98 public:
99  LangCodeSaver(QWidget* p):QLineEdit(p){}
100 public slots:
101  void setLangCode(int);
102 };
103 
104 #include <kross/ui/view.h>
105 class ScriptsView: public Kross::ActionCollectionView
106 {
107 Q_OBJECT
108 public:
109  ScriptsView(QWidget* parent);
110 
111 // public slots:
112 // void addScsetText(const QString&);
113 
114  void dragEnterEvent(QDragEnterEvent* event);
115  void dropEvent(QDropEvent* event);
116 
117 };
118 
119 
120 #endif
SettingsController::projectCreate
bool projectCreate()
Definition: prefs.cpp:213
RelPathSaver::setText
void setText(const QString &)
Definition: prefs.cpp:356
LangCodeSaver
helper widget to save lang code text values identified by LanguageListModel string index internally ...
Definition: prefs.h:95
QWidget
SettingsController::reflectRelativePathsHack
void reflectRelativePathsHack()
Definition: prefs.cpp:340
ScriptsView::ScriptsView
ScriptsView(QWidget *parent)
Definition: prefs.cpp:162
ScriptsView::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event)
Definition: prefs.cpp:167
SettingsController::projectConfigure
void projectConfigure()
Definition: prefs.cpp:239
LangCodeSaver::LangCodeSaver
LangCodeSaver(QWidget *p)
Definition: prefs.h:99
RelPathSaver
helper widget to save relative paths in project file, thus allowing its publishing in e...
Definition: prefs.h:81
SettingsController::SettingsController
SettingsController()
Definition: prefs.cpp:80
QObject
QDropEvent
ScriptsView
Definition: prefs.h:105
SettingsController::dirty
bool dirty
Definition: prefs.h:44
QString
ScriptsView::dropEvent
void dropEvent(QDropEvent *event)
Definition: prefs.cpp:173
SettingsController::instance
static SettingsController * instance()
Definition: prefs.cpp:70
SettingsController::reflectProjectConfigChange
void reflectProjectConfigChange()
Definition: prefs.cpp:334
SettingsController::projectOpen
QString projectOpen(QString path=QString(), bool doOpen=true)
Definition: prefs.cpp:196
QDragEnterEvent
SettingsController::setMainWindowPtr
void setMainWindowPtr(QWidget *w)
Definition: prefs.h:46
SettingsController
Singleton that manages cfgs for Lokalize and projects.
Definition: prefs.h:36
LangCodeSaver::setLangCode
void setLangCode(int)
Definition: prefs.cpp:351
SettingsController::showSettingsDialog
void showSettingsDialog()
Definition: prefs.cpp:91
SettingsController::~SettingsController
~SettingsController()
Definition: prefs.cpp:87
RelPathSaver::RelPathSaver
RelPathSaver(QWidget *p)
Definition: prefs.h:85
QLineEdit
SettingsController::ensureProjectIsLoaded
bool ensureProjectIsLoaded()
Definition: prefs.cpp:181
SettingsController::generalSettingsChanged
void generalSettingsChanged()
SettingsController::mainWindowPtr
QWidget * mainWindowPtr()
Definition: prefs.h:47
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