mainwindow.cpp
00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2005 Tobias Koenig <tokoe@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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #include <kaction.h> 00022 #include <klocale.h> 00023 #include <kstdaction.h> 00024 #include <ktoolbar.h> 00025 00026 #include "mainwidget.h" 00027 00028 #include "mainwindow.h" 00029 00030 MainWindow::MainWindow() 00031 : KMainWindow( 0 ) 00032 { 00033 setWFlags( getWFlags() | WGroupLeader ); 00034 00035 setCaption( i18n( "PIM Synchronization" ) ); 00036 00037 mWidget = new MainWidget( this, this, "MainWidget" ); 00038 00039 setCentralWidget( mWidget ); 00040 00041 initActions(); 00042 00043 createGUI( "kitchensyncui.rc", false ); 00044 createGUI( 0 ); 00045 00046 toolBar()->setIconText( KToolBar::IconTextBottom ); 00047 00048 resize( 760, 530 ); // initial size 00049 setAutoSaveSettings(); 00050 } 00051 00052 MainWindow::~MainWindow() 00053 { 00054 } 00055 00056 void MainWindow::initActions() 00057 { 00058 KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); 00059 } 00060 00061 #include "mainwindow.moc"