1
/*****************************************************************************
2
* This file is part of Kiten, a KDE Japanese Reference Tool *
3
* Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com> *
5
* This library is free software; you can redistribute it and/or *
6
* modify it under the terms of the GNU Library General Public *
7
* License as published by the Free Software Foundation; either *
8
* version 2 of the License, or (at your option) any later version. *
10
* This library 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 GNU *
13
* Library General Public License for more details. *
15
* You should have received a copy of the GNU Library General Public License *
16
* along with this library; see the file COPYING.LIB. If not, write to *
17
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
18
* Boston, MA 02110-1301, USA. *
19
*****************************************************************************/
21
#ifndef KITEN_DICTIONARYPREFERENCEDIALOG_H
22
#define KITEN_DICTIONARYPREFERENCEDIALOG_H
26
#include "libkitenexport.h"
29
* @short This abstract base class specifies the interface for dictionary
30
* preference dialogs in user applications. The DictionaryManager class can be
31
* asked for a list of these objects for the current session, and the appropriate
32
* signal/slot connections can be made to handle dictionary preferences transparently
33
* to the user application.
35
* One annoying caveat is that the user application still has to add preference elements
36
* to it's own kcfg file, or the preference code will crash when trying to work with it.
37
* Sadly, at the moment the only way to figure out what needs to be added to the kcfg is
38
* to read the code, or the kiten.kcfg implementation.
40
* @author Joseph Kerian \<jkerian@gmail.com\>
42
class KITEN_EXPORT DictionaryPreferenceDialog : public QWidget
48
* Basic constructor. Used by internal classes only. Implement if you are
49
* adding your own dictionary type.
51
* @param parent the parent widget, as per normal Qt Widget handling
52
* @param name the name of your widget, as understood by the preference code
54
DictionaryPreferenceDialog( QWidget *parent, const QString &name );
58
virtual ~DictionaryPreferenceDialog();
60
* Get the dictionary type name associated with this dialog
66
* Connect the signal of your preferenes dialog to this updateWidgets slot, to handle reading
67
* preference settings cleanly. You can also call this slot directly from your own updateWidgets slot.
69
virtual void updateWidgets() = 0;
71
* Connect the signal of your preferenes dialog to this updateWidgetsDefault slot, to handle setting
72
* preference settings back to their default settings easily.
74
virtual void updateWidgetsDefault() = 0;
76
* Connect the signal of your preferenes dialog to this updateSettings slot, to handle saving
77
* user's preference information.
79
virtual void updateSettings() = 0;
83
* When the user edits something on this preference page, this signal should be emitted
89
* A place to store the name, passed in the constructor