~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/widgets/shortcutconfig.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2005-08-23 17:19:39 UTC
  • mto: (4.1.1 breezy) (1.1.9) (10.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20050823171939-hd8fgzokb4dbj007
Tags: upstream-0.7.1+0.7.2pre2
ImportĀ upstreamĀ versionĀ 0.7.1+0.7.2pre2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// C++ Interface: shortcutconfig
 
3
//
 
4
// Description:
 
5
// Dialog for configuring keyboard shortcuts
 
6
//
 
7
// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
 
8
//
 
9
// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
 
10
//
 
11
//
 
12
#ifndef __SHORTCUTCONFIG_H
 
13
#define __SHORTCUTCONFIG_H
 
14
 
 
15
#include "shortcutconfigbase.h"
 
16
#include <qlistview.h>
 
17
 
 
18
#define SHRT_CATEGORY_COL 0
 
19
enum
 
20
      {
 
21
      SHRT_DESCR_COL = 0,
 
22
      SHRT_SHRTCUT_COL
 
23
      };
 
24
 
 
25
class SCListViewItem : public QListViewItem {
 
26
      private:
 
27
      int index;
 
28
 
 
29
      public:
 
30
      SCListViewItem(QListView* parent, int i)
 
31
            : QListViewItem(parent), index(i) { }
 
32
      int getIndex() { return index; }
 
33
 
 
34
};
 
35
 
 
36
 
 
37
class ShortcutConfig : public ShortcutConfigBase {
 
38
      Q_OBJECT
 
39
      private:
 
40
      int current_category;
 
41
      void updateSCListView(int category);
 
42
      void updateSCListView() { updateSCListView(current_category); }
 
43
      void closeEvent(QCloseEvent *e);
 
44
 
 
45
      private slots:
 
46
      void categorySelChanged(QListViewItem*);
 
47
      void shortcutSelChanged(QListViewItem*);
 
48
      void assignShortcut();
 
49
      void clearShortcut();
 
50
      void assignAll();
 
51
 
 
52
 
 
53
      public:
 
54
      ShortcutConfig(QWidget* parent, const char* name = 0);
 
55
      bool _config_changed;
 
56
 
 
57
};
 
58
 
 
59
#endif