2000-04-15 14:46:28 +00:00
|
|
|
/*
|
|
|
|
* kdvi: KDE dvi viewer
|
|
|
|
* This file: Copyright (C) 2000 Espen Sand, espen@kde.org
|
|
|
|
* Based on ealier dialog code
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifndef _OPTION_DIALOG_H_
|
|
|
|
#define _OPTION_DIALOG_H_
|
|
|
|
|
2000-11-29 12:17:44 +00:00
|
|
|
class KComboBox;
|
2001-08-20 16:13:34 +00:00
|
|
|
class KInstance;
|
|
|
|
class KLineEdit;
|
|
|
|
class QCheckBox;
|
2000-04-15 14:46:28 +00:00
|
|
|
class QLabel;
|
|
|
|
class QLineEdit;
|
|
|
|
class QSpinBox;
|
|
|
|
|
|
|
|
#include <kdialogbase.h>
|
|
|
|
|
|
|
|
class OptionDialog : public KDialogBase
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
struct FontItems
|
|
|
|
{
|
2000-11-29 12:17:44 +00:00
|
|
|
int pageIndex;
|
|
|
|
KComboBox *metafontMode;
|
|
|
|
QCheckBox *fontPathCheck;
|
2000-04-15 14:46:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct RenderItems
|
|
|
|
{
|
2000-11-29 12:17:44 +00:00
|
|
|
int pageIndex;
|
|
|
|
QCheckBox *showSpecialCheck;
|
|
|
|
QCheckBox *showHyperLinksCheck;
|
2001-08-20 16:13:34 +00:00
|
|
|
KComboBox *editorChoice;
|
|
|
|
QLabel *editorDescription;
|
|
|
|
KLineEdit *editorCallingCommand;
|
2000-04-15 14:46:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
public:
|
|
|
|
OptionDialog( QWidget *parent=0, const char *name=0, bool modal=true);
|
|
|
|
virtual void show();
|
2001-08-20 16:13:34 +00:00
|
|
|
QString EditorCommand;
|
2000-04-15 14:46:28 +00:00
|
|
|
|
|
|
|
protected slots:
|
2001-08-20 16:13:34 +00:00
|
|
|
void slotOk();
|
|
|
|
void slotApply();
|
|
|
|
void slotComboBox(int item);
|
|
|
|
void slotUserDefdEditorCommand( const QString & );
|
2001-10-01 05:24:23 +00:00
|
|
|
void slotExtraHelpButton( const QString &);
|
2000-04-15 14:46:28 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void makeFontPage();
|
|
|
|
void makeRenderingPage();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void preferencesChanged();
|
|
|
|
|
|
|
|
private:
|
2001-08-20 16:13:34 +00:00
|
|
|
bool isUserDefdEditor;
|
|
|
|
QString usersEditorCommand;
|
2000-04-15 14:46:28 +00:00
|
|
|
FontItems mFont;
|
|
|
|
RenderItems mRender;
|
2000-05-22 11:58:18 +00:00
|
|
|
|
2001-08-20 16:13:34 +00:00
|
|
|
QStringList EditorNames;
|
|
|
|
QStringList EditorCommands;
|
|
|
|
QStringList EditorDescriptions;
|
2000-05-22 11:58:18 +00:00
|
|
|
|
2001-08-20 16:13:34 +00:00
|
|
|
KInstance *_instance;
|
2000-04-15 14:46:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|