epsexportdlg.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2002, The Karbon Developers
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include <tqbuttongroup.h>
21#include <tqradiobutton.h>
22#include <tqstring.h>
23#include <tqvbox.h>
24#include <tqcheckbox.h>
25
26#include <tdelocale.h>
27#include <knuminput.h>
28
29#include "epsexportdlg.h"
30
31
32EpsExportDlg::EpsExportDlg( TQWidget* parent, const char* name )
33 : KDialogBase( parent, name, true, i18n( "EPS Export" ), Ok | Cancel )
34{
35 TQVBox* page = makeVBoxMainWidget();
36
37 m_psLevelButtons = new TQButtonGroup( 1, TQt::Horizontal,
38 i18n( "Options" ), page );
39
40 TQRadioButton* radio;
41 radio = new TQRadioButton( i18n( "PostScript level 1" ), m_psLevelButtons );
42 radio = new TQRadioButton( i18n( "PostScript level 2" ), m_psLevelButtons );
43 radio = new TQRadioButton( i18n( "PostScript level 3" ), m_psLevelButtons );
44
45 m_hiddenExport = new TQCheckBox( i18n( "Export hidden layers" ), page );
46 m_hiddenExport->setChecked( true );
47
48 m_psLevelButtons->setRadioButtonExclusive( true );
49 m_psLevelButtons->setButton( 2 );
50}
51
52uint
53EpsExportDlg::psLevel() const
54{
55 return static_cast<uint>(
56 m_psLevelButtons->id( m_psLevelButtons->selected() ) );
57}
58
59bool
60EpsExportDlg::exportHidden() const
61{
62 return m_hiddenExport->isChecked();
63}
64#include "epsexportdlg.moc"
65