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.
7
/***************************************************************************
8
* Copyright (C) 2006 by Craig Bradney *
9
* cbradney@zip.com.au *
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. *
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. *
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
29
#include "tabkeyboardshortcutswidgetbase.h"
30
#include "scribusapi.h"
31
#include "scribusstructs.h"
37
#include <qstringlist.h>
38
#include <qvaluevector.h>
39
#include <qlistview.h>
41
class TabKeyboardShortcutsWidget: public TabKeyboardShortcutsWidgetBase
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();
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;
70
void importKeySet(QString);
71
bool exportKeySet(QString);
72
QStringList scanForSets();
73
bool checkKey(int Code);
77
void dispKey(QListViewItem*);
79
void loadKeySetFile();
80
void importKeySetFile();
81
void exportKeySetFile();
83
void clearSearchString();
84
void applySearch( const QString & newss );