• 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
actionproxy.h
Go to the documentation of this file.
1 /* ****************************************************************************
2  This file is part of Lokalize
3 
4  Copyright (C) 2008 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 ACTIONPROXY_H
25 #define ACTIONPROXY_H
26 
27 #include <QObject>
28 #include <QKeySequence>
29 #include <QMap>
30 class KAction;
31 class KStatusBar;
32 
33 #if 0
34 
39 class ActionProxy: public QObject
40 {
41  Q_OBJECT
42 
43 public:
44  ActionProxy(QObject* parent,QObject* receiver=0,const char* slot=0);
45  ~ActionProxy();
46 
47  void registerAction(QAction*);
48  void unregisterAction(/*QAction**/);
49 
50  void setStatusTip(const QString& st){m_statusTip=st;}//for TM suggestions
51  QKeySequence shortcut(){return m_keySequence;};//for TM suggestions
52 
53 public slots:
54  void setDisabled(bool);
55  void setEnabled(bool enabled){setDisabled(!enabled);}
56  void setChecked(bool);
57 
58 private slots:
59  void handleToggled(bool);
60 
61 signals:
62  void triggered(bool=false);
63  void toggled(bool);
64 
65 private:
66  QAction* m_currentAction;
67  bool m_disabled;
68  bool m_checked;
69  QString m_statusTip;
70  QKeySequence m_keySequence;
71 };
72 
73 #endif
74 
75 class StatusBarProxy: public QMap<int,QString>
76 {
77 public:
78  StatusBarProxy():m_currentStatusBar(0){}
79  ~StatusBarProxy(){}
80 
81  void insert(int,const QString&);
82 
83  void registerStatusBar(KStatusBar*);
84  void unregisterStatusBar(){m_currentStatusBar=0;}
85 
86 private:
87  KStatusBar* m_currentStatusBar;
88 
89 };
90 
91 
92 #define ID_STATUS_PROGRESS 0
93 #define ID_STATUS_CURRENT 1
94 #define ID_STATUS_TOTAL 2
95 #define ID_STATUS_FUZZY 3
96 #define ID_STATUS_UNTRANS 4
97 #define ID_STATUS_ISFUZZY 5
98 #define TOTAL_ID_STATUSES 6
99 //#define ID_STATUS_READONLY 6
100 //#define ID_STATUS_CURSOR 7
101 
102 #endif
StatusBarProxy::insert
void insert(int, const QString &)
Definition: actionproxy.cpp:97
StatusBarProxy::registerStatusBar
void registerStatusBar(KStatusBar *)
Definition: actionproxy.cpp:104
QMap
QObject
QString
StatusBarProxy
Definition: actionproxy.h:75
QKeySequence
StatusBarProxy::unregisterStatusBar
void unregisterStatusBar()
Definition: actionproxy.h:84
QAction
StatusBarProxy::StatusBarProxy
StatusBarProxy()
Definition: actionproxy.h:78
StatusBarProxy::~StatusBarProxy
~StatusBarProxy()
Definition: actionproxy.h:79
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