Maliit Plugins  0.92.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
tagbinding.h
Go to the documentation of this file.
1 // -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
2 /*
3  * This file is part of Maliit Plugins
4  *
5  * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
6  *
7  * Contact: Mohammad Anwari <Mohammad.Anwari@nokia.com>
8  *
9  * Redistribution and use in source and binary forms, with or without modification,
10  * are permitted provided that the following conditions are met:
11  *
12  * Redistributions of source code must retain the above copyright notice, this list
13  * of conditions and the following disclaimer.
14  * Redistributions in binary form must reproduce the above copyright notice, this list
15  * of conditions and the following disclaimer in the documentation and/or other materials
16  * provided with the distribution.
17  * Neither the name of Nokia Corporation nor the names of its contributors may be
18  * used to endorse or promote products derived from this software without specific
19  * prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
22  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
24  * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  *
31  */
32 
33 #ifndef MALIIT_KEYBOARD_TAG_BINDING_H
34 #define MALIIT_KEYBOARD_TAG_BINDING_H
35 
36 #include <QtGlobal>
37 #include <QSharedPointer>
38 #include <QString>
39 
40 namespace MaliitKeyboard {
41 
43 {
44  Q_DISABLE_COPY(TagBinding)
45 
46 public:
47  enum Action {
54  Sym,
63  Up,
66  };
67 
69  bool shift,
70  bool alt,
71  const QString &label,
72  const QString &secondary_label,
73  const QString &accents,
74  const QString &accented_labels,
75  const QString &extended_labels,
76  const QString &cycle_set,
77  bool dead,
78  bool quick_pick,
79  bool rtl,
80  bool enlarge);
81 
82  Action action() const;
83  bool shift() const;
84  bool alt() const;
85  const QString label() const;
86  const QString secondary_label() const;
87  const QString accents() const;
88  const QString accented_labels() const;
89  const QString extended_labels() const;
90  const QString cycle_set() const;
91  bool dead() const;
92  bool quick_pick() const;
93  bool rtl() const;
94  bool enlarge() const;
95 
96  bool operator==(const TagBinding &other) const;
97 
98 private:
100  const bool m_shift;
101  const bool m_alt;
102  const QString m_label;
103  const QString m_secondary_label;
104  const QString m_accents;
105  const QString m_accented_labels;
106  const QString m_extended_labels;
107  const QString m_cycle_set;
108  const bool m_dead;
109  const bool m_quick_pick;
110  const bool m_rtl;
111  const bool m_enlarge;
112 };
113 
114 typedef QSharedPointer<TagBinding> TagBindingPtr;
115 
116 } // namespace MaliitKeyboard
117 
118 #endif // MALIIT_KEYBOARD_TAG_BINDING_H