• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kremotecontrol

  • sources
  • kde-4.12
  • kdeutils
  • kremotecontrol
  • kcmremotecontrol
editkeypressaction.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 Michael Zanetti <mzanetti@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License along
15  with this program; if not, write to the Free Software Foundation, Inc.,
16  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 
18 */
19 
20 #ifndef EDITKEYPRESSACTION_H
21 #define EDITKEYPRESSACTION_H
22 
23 #include "ui_editkeypressaction.h"
24 
25 #include "keypressaction.h"
26 
27 #include <QStandardItemModel>
28 
29 class KeySequenceListModel;
30 
31 class EditKeypressAction: public QWidget{
32  Q_OBJECT
33 
34  public:
35 
36  explicit EditKeypressAction(KeypressAction *action, QWidget* parent = 0, Qt::WFlags flags = 0);
37  ~EditKeypressAction();
38 
39  bool checkForComplete() const;
40  void applyChanges();
41  KeypressAction action() const;
42 
43  private:
44  Ui::EditKeypressAction ui;
45 
46  KeypressAction *m_action;
47  KeySequenceListModel *m_model;
48 
49  private Q_SLOTS:
50  void keySequenceChanged();
51  void setKeySequence(const QKeySequence &);
52  void on_pbAdd_clicked();
53  void on_pbRemove_clicked();
54  void on_pbUp_clicked();
55  void on_pbDown_clicked();
56  void activateButtons();
57 
58  Q_SIGNALS:
59  void formComplete(bool complete);
60 };
61 
62 class KeySequenceItem: public QStandardItem
63 {
64 public:
65  KeySequenceItem(const QKeySequence &seq);
66  virtual QVariant data(int role = Qt::UserRole + 1) const;
67 
68 private:
69  QKeySequence m_sequence;
70 };
71 
72 class KeySequenceListModel: public QStandardItemModel
73 {
74 public:
75  KeySequenceListModel(QObject *parent = 0);
76  void setList(QList<QKeySequence> list);
77  QList<QKeySequence> keySeqenceList();
78 };
79 
80 #endif // EDITDBUSACTION_H
KeySequenceItem::data
virtual QVariant data(int role=Qt::UserRole+1) const
Definition: editkeypressaction.cpp:119
EditKeypressAction::action
KeypressAction action() const
Definition: editkeypressaction.cpp:61
QWidget
KeySequenceListModel::keySeqenceList
QList< QKeySequence > keySeqenceList()
Definition: editkeypressaction.cpp:141
QStandardItemModel
KeypressAction
Definition: keypressaction.h:27
keypressaction.h
QObject
EditKeypressAction::formComplete
void formComplete(bool complete)
KeySequenceListModel
Definition: editkeypressaction.h:72
EditKeypressAction::checkForComplete
bool checkForComplete() const
Definition: editkeypressaction.cpp:52
EditKeypressAction::EditKeypressAction
EditKeypressAction(KeypressAction *action, QWidget *parent=0, Qt::WFlags flags=0)
Definition: editkeypressaction.cpp:22
EditKeypressAction::applyChanges
void applyChanges()
Definition: editkeypressaction.cpp:56
EditKeypressAction::~EditKeypressAction
~EditKeypressAction()
Definition: editkeypressaction.cpp:49
EditKeypressAction
Definition: editkeypressaction.h:31
KeySequenceItem::KeySequenceItem
KeySequenceItem(const QKeySequence &seq)
Definition: editkeypressaction.cpp:81
KeySequenceListModel::KeySequenceListModel
KeySequenceListModel(QObject *parent=0)
Definition: editkeypressaction.cpp:129
QStandardItem
KeySequenceItem
Definition: editkeypressaction.h:62
KeySequenceListModel::setList
void setList(QList< QKeySequence > list)
Definition: editkeypressaction.cpp:135
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kremotecontrol

Skip menu "kremotecontrol"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

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