Loading...
Searching...
No Matches
editSingleShortcut.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef BALL_VIEW_DIALOGS_EDITSINGLESHORTCUT_H
#define BALL_VIEW_DIALOGS_EDITSINGLESHORTCUT_H
#ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
# include <BALL/VIEW/KERNEL/preferencesEntry.h>
#endif
#ifndef BALL_VIEW_KERNEL_SHORTCUTREGISTRY_H
# include <BALL/VIEW/KERNEL/shortcutRegistry.h>
#endif
#ifndef BALL_VIEW_KERNEL_MODULARWIDGET_H
# include <BALL/VIEW/KERNEL/modularWidget.h>
#endif
#include <BALL/VIEW/UIC/ui_editSingleShortcut.h>
#include <QtWidgets/QDialog>
class QModelIndex;
namespace BALL
{
namespace VIEW
{
class BALL_VIEW_EXPORT EditSingleShortcut
: public QDialog,
public Ui_EditSingleShortcutData
{
// macro needed for Qt's slot mechanism:
Q_OBJECT
public:
EditSingleShortcut(QWidget* parent = NULL, const char* name = "EditSingleShortcut", Qt::WindowFlags fl = 0 );
QKeySequence const& getKeySequence() const { return new_sequence_; }
void setIndex(const QModelIndex& index);
void reset();
void setup(const QString& shortcut);
public Q_SLOTS:
virtual void accept();
virtual void reject();
protected Q_SLOTS:
void modeChanged_(bool toggled);
protected:
bool is_recording_;
unsigned int modifiers_;
int key_;
QKeySequence new_sequence_;
void setErrorText(QString error);
void setShortcutText(QString new_keysequence);
void updateText_();
void changeMode_(bool mode);
void keyPressEvent(QKeyEvent* evt);
void keyReleaseEvent(QKeyEvent* evt);
void startRecording_();
void stopRecording_();
};
}
}
#endif
BALL_VIEW_EXPORT
#define BALL_VIEW_EXPORT
Definition COMMON/global.h:52
BALL::VIEW::EditSingleShortcut::startRecording_
void startRecording_()
BALL::VIEW::EditSingleShortcut::accept
virtual void accept()
BALL::VIEW::EditSingleShortcut::modifiers_
unsigned int modifiers_
Definition editSingleShortcut.h:63
BALL::VIEW::EditSingleShortcut::EditSingleShortcut
EditSingleShortcut(QWidget *parent=NULL, const char *name="EditSingleShortcut", Qt::WindowFlags fl=0)
Constructor.
BALL::VIEW::EditSingleShortcut::keyPressEvent
void keyPressEvent(QKeyEvent *evt)
BALL::VIEW::EditSingleShortcut::is_recording_
bool is_recording_
Definition editSingleShortcut.h:61
BALL::VIEW::EditSingleShortcut::keyReleaseEvent
void keyReleaseEvent(QKeyEvent *evt)
BALL::VIEW::EditSingleShortcut::changeMode_
void changeMode_(bool mode)
BALL::VIEW::EditSingleShortcut::modeChanged_
void modeChanged_(bool toggled)
BALL::VIEW::EditSingleShortcut::reject
virtual void reject()
BALL::VIEW::EditSingleShortcut::setIndex
void setIndex(const QModelIndex &index)
BALL::VIEW::EditSingleShortcut::key_
int key_
Definition editSingleShortcut.h:64
BALL::VIEW::EditSingleShortcut::setShortcutText
void setShortcutText(QString new_keysequence)
BALL::VIEW::EditSingleShortcut::reset
void reset()
BALL::VIEW::EditSingleShortcut::new_sequence_
QKeySequence new_sequence_
Definition editSingleShortcut.h:65
BALL::VIEW::EditSingleShortcut::updateText_
void updateText_()
BALL::VIEW::EditSingleShortcut::stopRecording_
void stopRecording_()
BALL::VIEW::EditSingleShortcut::getKeySequence
QKeySequence const & getKeySequence() const
Definition editSingleShortcut.h:47
BALL::VIEW::EditSingleShortcut::setup
void setup(const QString &shortcut)
BALL::VIEW::EditSingleShortcut::setErrorText
void setErrorText(QString error)
QDialog
QWidget
modularWidget.h
BALL::VIEW
Definition constraints.h:35
BALL
Definition constants.h:13
preferencesEntry.h
shortcutRegistry.h