~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to khotkeys/kcm_hotkeys/hotkeys_model.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License as published by the Free Software Foundation; either
 
7
   version 2 of the License, or (at your option) any later version.
 
8
 
 
9
   This library 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 GNU
 
12
   Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this library; see the file COPYING.LIB.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
   Boston, MA 02110-1301, USA.
 
18
*/
 
19
 
 
20
#include "hotkeys_model.h"
 
21
 
 
22
#include "action_data/simple_action_data.h"
 
23
#include "action_data/menuentry_shortcut_action_data.h"
 
24
#include "action_data/action_data_group.h"
 
25
 
 
26
#include <typeinfo>
 
27
 
 
28
#include <QMimeData>
 
29
 
 
30
#include <KDE/KDebug>
 
31
#include <KDE/KLocale>
 
32
#include <KDE/KIcon>
 
33
 
 
34
 
 
35
static KHotKeys::ActionDataBase *findElement(
 
36
        void *ptr
 
37
        ,KHotKeys::ActionDataGroup *root)
 
38
    {
 
39
    Q_ASSERT(root);
 
40
    if (!root) return NULL;
 
41
 
 
42
    KHotKeys::ActionDataBase *match = NULL;
 
43
 
 
44
    Q_FOREACH( KHotKeys::ActionDataBase *element, root->children())
 
45
        {
 
46
        if (ptr == element)
 
47
            {
 
48
            match = element;
 
49
            break;
 
50
            }
 
51
 
 
52
        if (KHotKeys::ActionDataGroup *subGroup = dynamic_cast<KHotKeys::ActionDataGroup*>(element))
 
53
            {
 
54
            match = findElement(ptr, subGroup);
 
55
            if (match) break;
 
56
            }
 
57
        }
 
58
 
 
59
    return match;
 
60
    }
 
61
 
 
62
 
 
63
 
 
64
KHotkeysModel::KHotkeysModel( QObject *parent )
 
65
    : QAbstractItemModel(parent)
 
66
     ,_settings()
 
67
     ,_actions(0)
 
68
    {}
 
69
 
 
70
 
 
71
KHotkeysModel::~KHotkeysModel()
 
72
    {
 
73
    }
 
74
 
 
75
 
 
76
QModelIndex KHotkeysModel::addGroup( const QModelIndex & parent )
 
77
    {
 
78
    KHotKeys::ActionDataGroup *list;
 
79
    if (parent.isValid())
 
80
        {
 
81
        list = indexToActionDataGroup(parent);
 
82
        }
 
83
    else
 
84
        {
 
85
        list = _actions;
 
86
        }
 
87
    Q_ASSERT(list);
 
88
 
 
89
    beginInsertRows( parent, list->size(), list->size() );
 
90
 
 
91
    /* KHotKeys:: ActionDataGroup *action = */
 
92
    new KHotKeys::ActionDataGroup( list, i18n("New Group"), i18n("Comment"));
 
93
 
 
94
    endInsertRows();
 
95
    return index( list->size()-1, NameColumn, parent );
 
96
    }
 
97
 
 
98
 
 
99
// Add a group
 
100
QModelIndex KHotkeysModel::insertActionData(  KHotKeys::ActionDataBase *data, const QModelIndex & parent )
 
101
    {
 
102
    Q_ASSERT(data);
 
103
 
 
104
    KHotKeys::ActionDataGroup *list;
 
105
    if (parent.isValid())
 
106
        {
 
107
        list = indexToActionDataGroup(parent);
 
108
        }
 
109
    else
 
110
        {
 
111
        list = _actions;
 
112
        }
 
113
    Q_ASSERT(list);
 
114
 
 
115
    beginInsertRows( parent, list->size(), list->size() );
 
116
 
 
117
    list->add_child(data);
 
118
 
 
119
    endInsertRows();
 
120
    return index( list->size()-1, NameColumn, parent );
 
121
    }
 
122
 
 
123
 
 
124
int KHotkeysModel::columnCount( const QModelIndex & ) const
 
125
    {
 
126
    return 2;
 
127
    }
 
128
 
 
129
 
 
130
QVariant KHotkeysModel::data( const QModelIndex &index, int role ) const
 
131
    {
 
132
    // Check that the index is valid
 
133
    if (!index.isValid())
 
134
        {
 
135
        return QVariant();
 
136
        }
 
137
 
 
138
    // Get the item behind the index
 
139
    KHotKeys::ActionDataBase *action = indexToActionDataBase(index);
 
140
    Q_ASSERT(action);
 
141
 
 
142
    // Handle CheckStateRole
 
143
    if (role==Qt::CheckStateRole)
 
144
        {
 
145
        switch(index.column())
 
146
            {
 
147
            case EnabledColumn:
 
148
                // If the parent is enabled we display the state of the object.
 
149
                // If the parent is disabled this object is disabled too.
 
150
                if (action->parent() && !action->parent()->isEnabled())
 
151
                    {
 
152
                    return Qt::Unchecked;
 
153
                    }
 
154
                return action->isEnabled()
 
155
                    ? Qt::Checked
 
156
                    : Qt::Unchecked;
 
157
 
 
158
            default:
 
159
                return QVariant();
 
160
            }
 
161
        }
 
162
 
 
163
    // Display and Tooltip. Tooltip displays the complete name. That's nice if
 
164
    // there is not enough space
 
165
    else if (role==Qt::DisplayRole || role==Qt::ToolTipRole)
 
166
        {
 
167
        switch (index.column())
 
168
            {
 
169
            case NameColumn:
 
170
                return action->name();
 
171
 
 
172
            case EnabledColumn:
 
173
                return QVariant();
 
174
 
 
175
            case IsGroupColumn:
 
176
                return indexToActionDataGroup(index)!=0;
 
177
 
 
178
            case TypeColumn:
 
179
                {
 
180
                const std::type_info &ti = typeid(*action);
 
181
                if (ti==typeid(KHotKeys::SimpleActionData))
 
182
                    return KHotkeysModel::SimpleActionData;
 
183
                else if (ti==typeid(KHotKeys::MenuEntryShortcutActionData))
 
184
                    return KHotkeysModel::SimpleActionData;
 
185
                else if (ti==typeid(KHotKeys::ActionDataGroup))
 
186
                    return KHotkeysModel::ActionDataGroup;
 
187
                else
 
188
                    return KHotkeysModel::Other;
 
189
                }
 
190
 
 
191
            default:
 
192
                return QVariant();
 
193
            }
 
194
        }
 
195
 
 
196
    // Decoration role
 
197
    else if (role==Qt::DecorationRole)
 
198
        {
 
199
        switch (index.column())
 
200
            {
 
201
            // The 0 is correct here. We want to decorate that column
 
202
            // regardless of the content it has
 
203
            case 0:
 
204
                return dynamic_cast<KHotKeys::ActionDataGroup*>(action)
 
205
                    ? KIcon("folder")
 
206
                    : QVariant();
 
207
 
 
208
            default:
 
209
                return QVariant();
 
210
            }
 
211
        }
 
212
 
 
213
    //Providing the current action name on edit
 
214
    else if (role==Qt::EditRole)
 
215
        {
 
216
        switch (index.column())
 
217
            {
 
218
            case NameColumn:
 
219
                return action->name();
 
220
 
 
221
            default:
 
222
                return QVariant();
 
223
            }
 
224
        }
 
225
 
 
226
    else if (role==Qt::ForegroundRole)
 
227
        {
 
228
        QPalette pal;
 
229
        switch (index.column())
 
230
            {
 
231
            case NameColumn:
 
232
                if (!action->isEnabled())
 
233
                    {
 
234
                    return pal.color(QPalette::Disabled, QPalette::Foreground);
 
235
                    }
 
236
 
 
237
            default:
 
238
                return QVariant();
 
239
            }
 
240
        }
 
241
 
 
242
    // For everything else
 
243
    return QVariant();
 
244
    }
 
245
 
 
246
 
 
247
bool KHotkeysModel::dropMimeData(
 
248
        const QMimeData *data
 
249
        ,Qt::DropAction action
 
250
        ,int row
 
251
        ,int column
 
252
        ,const QModelIndex &parent)
 
253
    {
 
254
    Q_UNUSED(column);
 
255
 
 
256
    // We only support move actions and our own mime type
 
257
    if ( (action!=Qt::CopyAction)
 
258
            || !data->hasFormat("application/x-pointer"))
 
259
        {
 
260
        kDebug() << "Drop not supported " << data->formats();
 
261
        return false;
 
262
        }
 
263
 
 
264
    // Decode the stream
 
265
    QByteArray encodedData = data->data("application/x-pointer");
 
266
    QDataStream stream(&encodedData, QIODevice::ReadOnly);
 
267
    QList<quintptr> ptrs;
 
268
    while (!stream.atEnd())
 
269
        {
 
270
        quintptr ptr;
 
271
        stream >> ptr;
 
272
        ptrs << ptr;
 
273
        }
 
274
 
 
275
    // No pointers, nothing to do
 
276
    if (ptrs.empty()) return false;
 
277
 
 
278
    // Get the group we have to drop into. If the drop target is no group get
 
279
    // it's parent and drop behind it
 
280
    int position = row;
 
281
    QModelIndex dropIndex = parent;
 
282
    KHotKeys::ActionDataGroup *dropToGroup = indexToActionDataGroup(dropIndex);
 
283
    if (!dropToGroup)
 
284
        {
 
285
        dropIndex = parent.parent();
 
286
        dropToGroup = indexToActionDataGroup(dropIndex);
 
287
        position = dropToGroup->children().indexOf(indexToActionDataBase(parent));
 
288
        }
 
289
 
 
290
    if (position==-1)
 
291
        {
 
292
        position = dropToGroup->size();
 
293
        }
 
294
 
 
295
    // Do the moves
 
296
    Q_FOREACH(quintptr ptr, ptrs)
 
297
        {
 
298
        KHotKeys::ActionDataBase *element = findElement(
 
299
                reinterpret_cast<void*>(ptr),
 
300
                _actions);
 
301
 
 
302
        if (element) moveElement(element, dropToGroup, position);
 
303
        }
 
304
 
 
305
    return true;
 
306
    }
 
307
 
 
308
 
 
309
void KHotkeysModel::emitChanged(KHotKeys::ActionDataBase *item)
 
310
    {
 
311
    Q_ASSERT( item );
 
312
 
 
313
    KHotKeys::ActionDataGroup *parent = item->parent();
 
314
    QModelIndex topLeft;
 
315
    QModelIndex bottomRight;
 
316
    if (!parent)
 
317
        {
 
318
        topLeft = createIndex( 0, 0, _actions );
 
319
        bottomRight = createIndex( 0, 0, _actions );
 
320
        }
 
321
    else
 
322
        {
 
323
        int row = parent->children().indexOf(item);
 
324
        topLeft = createIndex( row, 0, parent );
 
325
        bottomRight = createIndex( row, columnCount(topLeft), parent );
 
326
        }
 
327
 
 
328
    emit dataChanged( topLeft, bottomRight );
 
329
    }
 
330
 
 
331
 
 
332
void KHotkeysModel::exportInputActions(
 
333
        const QModelIndex &index,
 
334
        KConfigBase &config,
 
335
        const QString& id,
 
336
        const KHotKeys::ActionState state,
 
337
        bool mergingAllowed)
 
338
    {
 
339
    KHotKeys::ActionDataBase  *element = indexToActionDataBase(index);
 
340
    KHotKeys::ActionDataGroup *group   = indexToActionDataGroup(index);
 
341
 
 
342
    settings()->exportTo(
 
343
            group ? group : element->parent(),
 
344
            config,
 
345
            id,
 
346
            state,
 
347
            mergingAllowed);
 
348
    }
 
349
 
 
350
 
 
351
Qt::ItemFlags KHotkeysModel::flags( const QModelIndex &index ) const
 
352
    {
 
353
    Qt::ItemFlags flags = QAbstractItemModel::flags(index);
 
354
 
 
355
    Q_ASSERT(!(flags & Qt::ItemIsDropEnabled));
 
356
    Q_ASSERT(!(flags & Qt::ItemIsDragEnabled));
 
357
 
 
358
    if (!index.isValid())
 
359
        {
 
360
            return flags | Qt::ItemIsDropEnabled;
 
361
        }
 
362
 
 
363
    KHotKeys::ActionDataBase  *element = indexToActionDataBase(index);
 
364
    KHotKeys::ActionDataGroup *actionGroup = indexToActionDataGroup(index);
 
365
    if (!actionGroup) actionGroup = element->parent();
 
366
 
 
367
    Q_ASSERT(element);
 
368
    Q_ASSERT(actionGroup);
 
369
 
 
370
    // We do not allow dragging for system groups and their elements
 
371
    // We do not allow dropping into systemgroups
 
372
    if (!actionGroup->is_system_group())
 
373
        {
 
374
        flags |= Qt::ItemIsDragEnabled;
 
375
        flags |= Qt::ItemIsDropEnabled;
 
376
        }
 
377
 
 
378
    // Show a checkbox in column 1 whatever is shown there.
 
379
    switch (index.column())
 
380
        {
 
381
        case 1:
 
382
            return flags
 
383
                | Qt::ItemIsUserCheckable;
 
384
 
 
385
        default:
 
386
            return flags
 
387
                | Qt::ItemIsEditable;
 
388
        }
 
389
    }
 
390
 
 
391
 
 
392
// Get header data for section
 
393
QVariant KHotkeysModel::headerData( int section, Qt::Orientation, int role ) const
 
394
    {
 
395
    if (role!=Qt::DisplayRole)
 
396
        {
 
397
        return QVariant();
 
398
        }
 
399
 
 
400
    switch (section)
 
401
        {
 
402
        case NameColumn:
 
403
            return QVariant(i18nc("action name", "Name"));
 
404
 
 
405
        case EnabledColumn:
 
406
            return QVariant();
 
407
            return QVariant(i18nc("action enabled", "Enabled"));
 
408
 
 
409
        case IsGroupColumn:
 
410
            return QVariant(i18n("Type"));
 
411
 
 
412
        default:
 
413
            return QVariant();
 
414
        }
 
415
    }
 
416
 
 
417
 
 
418
void KHotkeysModel::importInputActions(const QModelIndex &index, KConfigBase const &config)
 
419
    {
 
420
    KHotKeys::ActionDataGroup *group = indexToActionDataGroup(index);
 
421
    QModelIndex groupIndex = index;
 
422
    if (!group)
 
423
        {
 
424
        group = indexToActionDataBase(index)->parent();
 
425
        groupIndex = index.parent();
 
426
        }
 
427
 
 
428
    if (settings()->importFrom(group, config, KHotKeys::ImportAsk, KHotKeys::Retain))
 
429
        {
 
430
        kDebug();
 
431
        reset();
 
432
        save();
 
433
        }
 
434
    }
 
435
 
 
436
 
 
437
QModelIndex KHotkeysModel::index( int row, int column, const QModelIndex &parent ) const
 
438
    {
 
439
    KHotKeys::ActionDataGroup *actionGroup = indexToActionDataGroup(parent);
 
440
    if (!actionGroup || row>=actionGroup->children().size() )
 
441
        {
 
442
        return QModelIndex();
 
443
        }
 
444
 
 
445
    KHotKeys::ActionDataBase *action =  actionGroup->children().at(row);
 
446
    Q_ASSERT( action );
 
447
    return createIndex( row, column, action );
 
448
    }
 
449
 
 
450
 
 
451
// Convert index to ActionDataBase
 
452
KHotKeys::ActionDataBase *KHotkeysModel::indexToActionDataBase( const QModelIndex &index ) const
 
453
    {
 
454
    if (!index.isValid())
 
455
        {
 
456
        return _actions;
 
457
        }
 
458
    return static_cast<KHotKeys::ActionDataBase*>( index.internalPointer() );
 
459
    }
 
460
 
 
461
 
 
462
// Convert index to ActionDataGroup
 
463
KHotKeys::ActionDataGroup *KHotkeysModel::indexToActionDataGroup( const QModelIndex &index ) const
 
464
    {
 
465
    if (!index.isValid())
 
466
        {
 
467
        return _actions;
 
468
        }
 
469
    return dynamic_cast<KHotKeys::ActionDataGroup*>( indexToActionDataBase(index) );
 
470
    }
 
471
 
 
472
 
 
473
void KHotkeysModel::load()
 
474
    {
 
475
    _settings.reread_settings(true);
 
476
    _actions = _settings.actions();
 
477
    reset();
 
478
    }
 
479
 
 
480
 
 
481
QMimeData *KHotkeysModel::mimeData(const QModelIndexList &indexes) const
 
482
    {
 
483
    QMimeData * mimeData = new QMimeData();
 
484
    QByteArray encodedData;
 
485
 
 
486
    QDataStream stream(&encodedData, QIODevice::WriteOnly);
 
487
 
 
488
    Q_FOREACH (const QModelIndex &index, indexes)
 
489
        {
 
490
        if (index.isValid() and index.column() == 0)
 
491
            {
 
492
            KHotKeys::ActionDataBase *element = indexToActionDataBase(index);
 
493
            // We use the pointer as id.
 
494
            stream << reinterpret_cast<quintptr>(element);
 
495
            }
 
496
        }
 
497
 
 
498
    mimeData->setData("application/x-pointer", encodedData);
 
499
    return mimeData;
 
500
    }
 
501
 
 
502
 
 
503
QStringList KHotkeysModel::mimeTypes() const
 
504
    {
 
505
    QStringList types;
 
506
    types << "application/x-pointer";
 
507
    return types;
 
508
    }
 
509
 
 
510
 
 
511
bool KHotkeysModel::moveElement(
 
512
        KHotKeys::ActionDataBase   *element
 
513
        ,KHotKeys::ActionDataGroup *newGroup
 
514
        ,int position)
 
515
    {
 
516
    Q_ASSERT(element && newGroup);
 
517
    if (!element || !newGroup) return false;
 
518
 
 
519
    // TODO: Make this logic more advanced
 
520
    // We do not allow moving into our systemgroup
 
521
    if (newGroup->is_system_group()) return false;
 
522
 
 
523
    // Make sure we don't move a group to one of it's children or
 
524
    // itself.
 
525
    KHotKeys::ActionDataGroup *tmp = newGroup;
 
526
    do  {
 
527
        if (tmp == element)
 
528
            {
 
529
            kDebug() << "Forbidden move" << tmp->name();
 
530
            return false;
 
531
            }
 
532
        }
 
533
        while((tmp = tmp->parent()));
 
534
 
 
535
    KHotKeys::ActionDataGroup *oldParent = element->parent();
 
536
 
 
537
    // TODO: Make this logic more advanced
 
538
    // We do not allow moving from our systemgroup
 
539
    if (oldParent->is_system_group()) return false;
 
540
 
 
541
    // Adjust position if oldParent and newGroup are identical
 
542
    if (oldParent == newGroup)
 
543
        {
 
544
        if (oldParent->children().indexOf(element) < position)
 
545
            {
 
546
            --position;
 
547
            }
 
548
        }
 
549
 
 
550
    emit layoutAboutToBeChanged();
 
551
 
 
552
    // Remove it from it's current place
 
553
    oldParent->remove_child(element);
 
554
    newGroup->add_child(element, position);
 
555
 
 
556
    emit layoutChanged();
 
557
 
 
558
    return true;
 
559
    }
 
560
 
 
561
 
 
562
// Get parent object for index
 
563
QModelIndex KHotkeysModel::parent( const QModelIndex &index ) const
 
564
    {
 
565
    KHotKeys::ActionDataBase *action = indexToActionDataBase(index);
 
566
    if (!action)
 
567
        {
 
568
        return QModelIndex();
 
569
        }
 
570
 
 
571
    KHotKeys::ActionDataGroup *parent = action->parent();
 
572
    if (!parent)
 
573
        {
 
574
        return QModelIndex();
 
575
        }
 
576
 
 
577
    KHotKeys::ActionDataGroup *grandparent = parent->parent();
 
578
    if (!grandparent)
 
579
        {
 
580
        return QModelIndex();
 
581
        }
 
582
 
 
583
    int row = grandparent->children().indexOf(parent);
 
584
    return createIndex( row, 0, parent );
 
585
    }
 
586
 
 
587
 
 
588
// Remove rows ( items )
 
589
bool KHotkeysModel::removeRows( int row, int count, const QModelIndex &parent )
 
590
    {
 
591
    Q_ASSERT( count == 1 );
 
592
 
 
593
    beginRemoveRows( parent, row, row+count-1 );
 
594
 
 
595
    KHotKeys::ActionDataGroup *list;
 
596
    if (parent.isValid())
 
597
        {
 
598
        list = indexToActionDataGroup(parent);
 
599
        }
 
600
    else
 
601
        {
 
602
        list = _actions;
 
603
        }
 
604
    Q_ASSERT(list);
 
605
 
 
606
    KHotKeys::ActionDataBase *action = indexToActionDataBase(index(row,0,parent));
 
607
 
 
608
    action->aboutToBeErased();
 
609
    delete action;
 
610
 
 
611
    endRemoveRows();
 
612
    return true;
 
613
    }
 
614
 
 
615
 
 
616
// Number of rows for index
 
617
int KHotkeysModel::rowCount( const QModelIndex &index ) const
 
618
    {
 
619
    KHotKeys::ActionDataGroup *group = indexToActionDataGroup(index);
 
620
    if (!group)
 
621
        {
 
622
        return 0;
 
623
        }
 
624
 
 
625
    return group->children().count();
 
626
    }
 
627
 
 
628
 
 
629
void KHotkeysModel::save()
 
630
    {
 
631
    _settings.write();
 
632
    }
 
633
 
 
634
 
 
635
// Set data
 
636
bool KHotkeysModel::setData( const QModelIndex &index, const QVariant &value, int role )
 
637
    {
 
638
 
 
639
    if ( !index.isValid() )
 
640
        {
 
641
        return false;
 
642
        }
 
643
 
 
644
    KHotKeys::ActionDataBase *action = indexToActionDataBase(index);
 
645
    Q_ASSERT( action );
 
646
 
 
647
    // Handle CheckStateRole
 
648
    if ( role == Qt::CheckStateRole )
 
649
        {
 
650
        switch(index.column())
 
651
            {
 
652
            case EnabledColumn:
 
653
                {
 
654
                // If the parent is enabled we display the state of the object.
 
655
                // If the parent is disabled this object is disabled too.
 
656
                if (action->parent() && !action->parent()->isEnabled())
 
657
                    {
 
658
                    // TODO: Either show a message box or enhance the gui to
 
659
                    // show this item cannot be enabled
 
660
                    return false;
 
661
                    }
 
662
 
 
663
                value.toInt() == Qt::Checked
 
664
                    ? action->enable()
 
665
                    : action->disable();
 
666
 
 
667
                // If this is a group we have to inform the view that all our
 
668
                // childs have changed. They are all disabled now
 
669
                KHotKeys::ActionDataGroup *actionGroup = indexToActionDataGroup(index);
 
670
                if (actionGroup && actionGroup->size())
 
671
                    {
 
672
                    Q_EMIT dataChanged(
 
673
                            createIndex(0, 0, actionGroup),
 
674
                            createIndex(actionGroup->size(), columnCount(index), actionGroup));
 
675
                    }
 
676
                }
 
677
                break;
 
678
 
 
679
            default:
 
680
                return false;
 
681
            }
 
682
        }
 
683
    else if ( role == Qt::EditRole )
 
684
        {
 
685
        switch ( index.column() )
 
686
            {
 
687
            case NameColumn:
 
688
                {
 
689
                action->set_name( value.toString() );
 
690
                }
 
691
                break;
 
692
 
 
693
            default:
 
694
                return false;
 
695
            }
 
696
        }
 
697
    else
 
698
        return false;
 
699
 
 
700
    emit dataChanged( index, index );
 
701
    return true;
 
702
    }
 
703
 
 
704
 
 
705
KHotKeys::Settings *KHotkeysModel::settings()
 
706
    {
 
707
    return &_settings;
 
708
    }
 
709
 
 
710
 
 
711
#include "moc_hotkeys_model.cpp"