kandy Library API Documentation

kandyprefsdialog.cpp

00001 /* 00002 This file is part of Kandy. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of Qt, and distribute the resulting executable, 00022 without including the source code for Qt in the source distribution. 00023 */ 00024 00025 #include <qlayout.h> 00026 #include <qlabel.h> 00027 #include <qgroupbox.h> 00028 #include <qbuttongroup.h> 00029 #include <qlineedit.h> 00030 #include <qfont.h> 00031 #include <qslider.h> 00032 #include <qfile.h> 00033 #include <qtextstream.h> 00034 #include <qcombobox.h> 00035 #include <qvbox.h> 00036 #include <qhbox.h> 00037 #include <qspinbox.h> 00038 #include <qdatetime.h> 00039 00040 #include <kapplication.h> 00041 #include <kdebug.h> 00042 #include <klocale.h> 00043 #include <kglobal.h> 00044 #include <kfontdialog.h> 00045 #include <kstandarddirs.h> 00046 #include <kmessagebox.h> 00047 #include <kcolordialog.h> 00048 #include <kiconloader.h> 00049 #include <kiconeffect.h> 00050 00051 #include "kandyprefs.h" 00052 00053 #include "kandyprefsdialog.h" 00054 #include "kandyprefsdialog.moc" 00055 00056 00057 KandyPrefsDialog::KandyPrefsDialog(QWidget *parent, char *name, bool modal) : 00058 KPrefsDialog(KandyPrefs::self(),parent,name,modal) 00059 { 00060 setupSerialTab(); 00061 setupWindowsTab(); 00062 } 00063 00064 00065 KandyPrefsDialog::~KandyPrefsDialog() 00066 { 00067 delete serialDevice; 00068 delete openOnStartup; 00069 delete startupTerminal; 00070 delete startupMobile; 00071 } 00072 00073 void KandyPrefsDialog::setupSerialTab() 00074 { 00075 QFrame *topFrame = addPage(i18n("Serial Interface"),0, 00076 DesktopIcon("connect_no",KIcon::SizeMedium)); 00077 00078 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 00079 topLayout->setSpacing(spacingHint()); 00080 topLayout->setMargin(marginHint()); 00081 00082 serialDevice = addWidString( KandyPrefs::self()->serialDeviceItem(), 00083 topFrame ); 00084 topLayout->addWidget(serialDevice->label(),0,0); 00085 topLayout->addWidget(serialDevice->lineEdit(),0,1); 00086 00087 openOnStartup = addWidBool( KandyPrefs::self()->startupModemItem(), 00088 topFrame ); 00089 topLayout->addWidget(openOnStartup->checkBox(),1,0); 00090 00091 topLayout->setRowStretch(2,1); 00092 } 00093 00094 void KandyPrefsDialog::setupWindowsTab() 00095 { 00096 QFrame *topFrame = addPage(i18n("Windows"),0, 00097 DesktopIcon("window_list",KIcon::SizeMedium)); 00098 00099 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 00100 topLayout->setSpacing(spacingHint()); 00101 topLayout->setMargin(marginHint()); 00102 00103 startupTerminal = addWidBool( KandyPrefs::self()->startupTerminalWinItem(), 00104 topFrame); 00105 topLayout->addWidget(startupTerminal->checkBox(),0,0); 00106 00107 startupMobile = addWidBool( KandyPrefs::self()->startupMobileWinItem(), 00108 topFrame ); 00109 topLayout->addWidget(startupMobile->checkBox(),1,0); 00110 00111 topLayout->setRowStretch(2,1); 00112 }
KDE Logo
This file is part of the documentation for kandy Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:51:01 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003