1
/***************************************************************************
2
* Copyright (C) 2004-2009 by Thomas Fischer *
3
* fischer@unix-ag.uni-kl.de *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
#ifndef KBIBTEXSETTINGSIDSUGGESTIONS_H
21
#define KBIBTEXSETTINGSIDSUGGESTIONS_H
25
#include <klistview.h>
29
class QRegExpValidator;
38
class IdSuggestionsListViewItem: public KListViewItem
41
IdSuggestionsListViewItem( KListView *, const QString&, BibTeX::Entry *example );
42
IdSuggestionsListViewItem( KListView *, KListViewItem *, const QString&, BibTeX::Entry *example );
43
void setText( int, const QString& );
44
QString originalText() const;
45
int width( const QFontMetrics &, const QListView *, int ) const;
49
BibTeX::Entry *m_example;
50
QString parse( const QString& );
54
@author Thomas Fischer <fischer@unix-ag.uni-kl.de>
56
class SettingsIdSuggestions : public QWidget
60
SettingsIdSuggestions( QWidget *parent = 0, const char *name = 0 );
61
~SettingsIdSuggestions();
70
void slotConfigChanged();
73
void slotNewIdSuggestion();
74
void slotEditIdSuggestion();
75
void slotDeleteIdSuggestion();
76
void slotMoveUpIdSuggestion();
77
void slotMoveDownIdSuggestion();
78
void slotToggleDefault();
79
void slotEditSmallWordsChanged( const QString & );
80
void slotAddSmallWord();
81
void slotDeleteSmallWord();
82
void slotListSmallWordsChanged();
86
KListView *m_listIdSuggestions;
87
KPushButton *m_buttonNewIdSuggestion;
88
KPushButton *m_buttonEditIdSuggestion;
89
KPushButton *m_buttonDeleteIdSuggestion;
90
KPushButton *m_buttonMoveUpIdSuggestion;
91
KPushButton *m_buttonMoveDownIdSuggestion;
92
KPushButton *m_buttonToggleDefault;
93
QCheckBox *m_checkBoxForceDefault;
94
KListView *m_listSmallWords;
95
KLineEdit *m_lineEditSmallWords;
96
KPushButton *m_buttonAddSmallWord;
97
KPushButton *m_buttonDeleteSmallWord;
98
QRegExpValidator *m_validator;
99
QListViewItem *m_defaultSuggestionItem;
100
static QString exampleBibTeXEntry;
101
BibTeX::Entry *m_example;