summaryrefslogtreecommitdiffstats
path: root/buildtools/qmake/qmakeoptionswidget.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /buildtools/qmake/qmakeoptionswidget.cpp
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/qmake/qmakeoptionswidget.cpp')
-rw-r--r--buildtools/qmake/qmakeoptionswidget.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/buildtools/qmake/qmakeoptionswidget.cpp b/buildtools/qmake/qmakeoptionswidget.cpp
new file mode 100644
index 00000000..89f63c1e
--- /dev/null
+++ b/buildtools/qmake/qmakeoptionswidget.cpp
@@ -0,0 +1,63 @@
+/***************************************************************************
+* Copyright (C) 2006 by Andreas Pakulat *
+* apaku@gmx.de *
+* *
+* 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. *
+* *
+***************************************************************************/
+
+#include "qmakeoptionswidget.h"
+
+#include <qcheckbox.h>
+#include <kcombobox.h>
+#include <qbuttongroup.h>
+#include <kurlrequester.h>
+
+#include <domutil.h>
+#include <kdebug.h>
+
+QMakeOptionsWidget::QMakeOptionsWidget( const QString& projectdir, QDomDocument &dom, const QString &configGroup,
+ QWidget *parent, const char *name )
+ : QMakeOptionsWidgetBase( parent, name ),
+ m_dom( dom ), m_configGroup( configGroup ), m_projectDir( projectdir )
+{
+ groupBehaviour->setButton( DomUtil::readIntEntry( dom, configGroup+"/qmake/savebehaviour", 2) );
+ checkReplacePaths->setChecked( DomUtil::readBoolEntry( dom, configGroup+"/qmake/replacePaths", false ) );
+ checkDisableDefaultOpts->setChecked( DomUtil::readBoolEntry( dom, configGroup+"/qmake/disableDefaultOpts", true ) );
+ checkFilenamesOnly->setChecked( DomUtil::readBoolEntry( dom, configGroup+"/qmake/enableFilenamesOnly", false ) );
+ showVariablesInTree->setChecked( DomUtil::readBoolEntry( dom, configGroup+"/qmake/showVariablesInTree", true ) );
+ checkShowParseErrors->setChecked( DomUtil::readBoolEntry( dom,
+ configGroup+"/qmake/showParseErrors", true ) );
+ qmakeProjectFile->setURL( DomUtil::readEntry( dom, configGroup+"/qmake/projectfile", "" ) );
+ qmakeProjectFile->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
+ qmakeProjectFile->setFilter( "*.pro *.pri" );
+ if( qmakeProjectFile->url().isEmpty() )
+ {
+ qmakeProjectFile->setURL( projectdir );
+ }
+}
+
+
+QMakeOptionsWidget::~QMakeOptionsWidget()
+{}
+
+
+void QMakeOptionsWidget::accept()
+{
+ DomUtil::writeIntEntry( m_dom, m_configGroup + "/qmake/savebehaviour", groupBehaviour->selectedId() );
+ DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/replacePaths", checkReplacePaths->isChecked() );
+ DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/disableDefaultOpts", checkDisableDefaultOpts->isChecked() );
+ DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/enableFilenamesOnly", checkFilenamesOnly->isChecked() );
+ DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/showVariablesInTree", showVariablesInTree->isChecked() );
+ DomUtil::writeBoolEntry( m_dom, m_configGroup + "/qmake/showParseErrors", checkShowParseErrors->isChecked() );
+ QString projfile = qmakeProjectFile->url();
+ if( projfile != m_projectDir && QFileInfo( projfile ).isFile() && ( projfile.endsWith( ".pro" ) || projfile.endsWith( ".pri" ) ) )
+ DomUtil::writeEntry( m_dom, m_configGroup + "/qmake/projectfile", projfile );
+}
+
+#include "qmakeoptionswidget.moc"
+
+// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on