KDevelop API Documentation

buildtools/custommakefiles/custombuildoptionswidget.cpp

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2002 by Bernd Gehrmann * 00003 * bernd@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #include "custombuildoptionswidget.h" 00013 00014 #include <qcheckbox.h> 00015 #include <qlineedit.h> 00016 #include <qradiobutton.h> 00017 #include <qtabwidget.h> 00018 #include "domutil.h" 00019 00020 00021 CustomBuildOptionsWidget::CustomBuildOptionsWidget(QDomDocument &dom, 00022 QWidget *parent, const char *name) 00023 : CustomBuildOptionsWidgetBase(parent, name), 00024 m_dom(dom) 00025 { 00026 ant_button->setChecked(DomUtil::readEntry(dom, "/kdevcustomproject/build/buildtool") == "ant"); 00027 builddir_edit->setText(DomUtil::readEntry(dom, "/kdevcustomproject/build/builddir")); 00028 00029 // This connection must not be made before the ant->setChecked() line, 00030 // because at this time makeToggled() would crash 00031 connect( make_button, SIGNAL(toggled(bool)), 00032 this, SLOT(makeToggled(bool)) ); 00033 } 00034 00035 00036 CustomBuildOptionsWidget::~CustomBuildOptionsWidget() 00037 {} 00038 00039 00040 void CustomBuildOptionsWidget::accept() 00041 { 00042 QString buildtool = ant_button->isChecked()? "ant" : "make"; 00043 DomUtil::writeEntry(m_dom, "/kdevcustomproject/build/buildtool", buildtool); 00044 DomUtil::writeEntry(m_dom, "/kdevcustomproject/build/builddir", builddir_edit->text()); 00045 } 00046 00047 00048 void CustomBuildOptionsWidget::setMakeOptionsWidget(QTabWidget *tw, QWidget *mow) 00049 { 00050 m_tabWidget = tw; 00051 m_makeOptions = mow; 00052 makeToggled(make_button->isChecked()); 00053 } 00054 00055 00056 void CustomBuildOptionsWidget::makeToggled(bool b) 00057 { 00058 m_tabWidget->setTabEnabled(m_makeOptions, b); 00059 } 00060 00061 #include "custombuildoptionswidget.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:38:54 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003