~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/shortcuthandler.cpp

  • Committer: Adam Reichold
  • Date: 2014-03-29 10:20:32 UTC
  • Revision ID: adam.reichold@t-online.com-20140329102032-6z5yl9a2fkwm62rd
Make proper use of application and anonymous namespaces and fix a few header guards.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "documentview.h"
28
28
 
29
 
static QList< QKeySequence > toShortcuts(const QStringList& stringList)
 
29
namespace
 
30
{
 
31
 
 
32
QList< QKeySequence > toShortcuts(const QStringList& stringList)
30
33
{
31
34
    QList< QKeySequence > shortcuts;
32
35
 
43
46
    return shortcuts;
44
47
}
45
48
 
46
 
static QStringList toStringList(const QList< QKeySequence >& shortcuts, QKeySequence::SequenceFormat format = QKeySequence::PortableText)
 
49
QStringList toStringList(const QList< QKeySequence >& shortcuts, QKeySequence::SequenceFormat format = QKeySequence::PortableText)
47
50
{
48
51
    QStringList stringList;
49
52
 
55
58
    return stringList;
56
59
}
57
60
 
58
 
static bool matches(const QKeySequence& keySequence, const QList< QKeySequence >& shortcuts)
 
61
bool matches(const QKeySequence& keySequence, const QList< QKeySequence >& shortcuts)
59
62
{
60
63
    foreach(const QKeySequence& shortcut, shortcuts)
61
64
    {
68
71
    return false;
69
72
}
70
73
 
 
74
} // anonymous
 
75
 
 
76
namespace qpdfview
 
77
{
 
78
 
71
79
ShortcutHandler* ShortcutHandler::s_instance = 0;
72
80
 
73
81
ShortcutHandler* ShortcutHandler::instance()
298
306
    m_moveRightAction->setShortcut(QKeySequence(Qt::Key_Right));
299
307
    registerAction(m_moveRightAction);
300
308
}
 
309
 
 
310
} // qpdfview