~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/tabkeyboardshortcutswidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2007-08-11 17:41:51 UTC
  • mfrom: (0.1.1 upstream) (4.1.2 feisty)
  • Revision ID: james.westby@ubuntu.com-20070811174151-tmkgjvjuc0mtk8ul
Tags: 1.3.4.dfsg+svn20071115-1
* Upstream svn update (Closes: #447480, #448949).
* debian/NEWS: Added a note for users wanting stable Scribus to switch to
  the "scribus" package (Closes: #427638).
* debian/watch: Updated the watch regex to properly track sourceforge
  releases for this branch (Closes: #449700).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
 
3
to the COPYING file provided with the program. Following this notice may exist
 
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
 
5
for which a new license (GPL+exception) is in place.
 
6
*/
 
7
/***************************************************************************
 
8
*   Copyright (C) 2006 by Craig Bradney                                   *
 
9
*   cbradney@zip.com.au                                                   *
 
10
*                                                                         *
 
11
*   This program is free software; you can redistribute it and/or modify  *
 
12
*   it under the terms of the GNU General Public License as published by  *
 
13
*   the Free Software Foundation; either version 2 of the License, or     *
 
14
*   (at your option) any later version.                                   *
 
15
*                                                                         *
 
16
*   This program is distributed in the hope that it will be useful,       *
 
17
*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
18
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
19
*   GNU General Public License for more details.                          *
 
20
*                                                                         *
 
21
*   You should have received a copy of the GNU General Public License     *
 
22
*   along with this program; if not, write to the                         *
 
23
*   Free Software Foundation, Inc.,                                       *
 
24
*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 
25
***************************************************************************/
 
26
#ifndef TABKEYBOARDSHORTCUTSWIDGET_H
 
27
#define TABKEYBOARDSHORTCUTSWIDGET_H
 
28
 
 
29
#include "tabkeyboardshortcutswidgetbase.h"
 
30
#include "scribusapi.h"
 
31
#include "scribusstructs.h"
 
32
 
 
33
#include <qmap.h>
 
34
#include <qpair.h>
 
35
#include <qptrlist.h>
 
36
#include <qstring.h>
 
37
#include <qstringlist.h>
 
38
#include <qvaluevector.h>
 
39
#include <qlistview.h>
 
40
 
 
41
class TabKeyboardShortcutsWidget: public TabKeyboardShortcutsWidgetBase 
 
42
{
 
43
        Q_OBJECT
 
44
        public:
 
45
                TabKeyboardShortcutsWidget(QMap<QString, Keys> oldKeyMap, QWidget *parent = 0, const char *name = 0);
 
46
                const QMap<QString, Keys> getNewKeyMap();
 
47
                static QString getKeyText(int KeyC);
 
48
                bool event( QEvent* ev );
 
49
                void keyPressEvent(QKeyEvent *k);
 
50
                void keyReleaseEvent(QKeyEvent *k);
 
51
                void restoreDefaults();
 
52
                
 
53
        protected:
 
54
                QMap<QString,Keys> keyMap;
 
55
                QMap<QString,Keys>::Iterator currentKeyMapRow;
 
56
                QMap<QString, QString> keySetList;
 
57
                QMap<QListViewItem*, QString> lviToActionMap;
 
58
                QPtrList<QListViewItem> lviToMenuMap;
 
59
                QValueVector< QPair<QString, QStringList> >* defMenus;
 
60
                QValueVector< QPair<QString, QStringList> >* defNonMenuActions;
 
61
                QListViewItem* selectedLVI;
 
62
                int keyCode;
 
63
                QString Part0;
 
64
                QString Part1;
 
65
                QString Part2;
 
66
                QString Part3;
 
67
                QString Part4;
 
68
        
 
69
                void insertActions();
 
70
                void importKeySet(QString);
 
71
                bool exportKeySet(QString);
 
72
                QStringList scanForSets();
 
73
                bool checkKey(int Code);
 
74
        
 
75
        protected slots:
 
76
                void setKeyText();
 
77
                void dispKey(QListViewItem*);
 
78
                void setNoKey();
 
79
                void loadKeySetFile();
 
80
                void importKeySetFile();
 
81
                void exportKeySetFile();
 
82
                void resetKeySet();
 
83
                void clearSearchString();
 
84
                void applySearch( const QString & newss );
 
85
};
 
86
 
 
87
#endif