File indexing completed on 2024-05-12 09:47:39
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 #include "importdir_logmsg.h" 0021 0022 #include "svnqt/version_check.h" 0023 0024 #include <KLocalizedString> 0025 #include <QCheckBox> 0026 0027 Importdir_logmsg::Importdir_logmsg(QWidget *parent) 0028 : Commitmsg_impl(parent) 0029 { 0030 m_createDirBox = new QCheckBox(this); 0031 hideKeepsLock(true); 0032 createDirboxDir(); 0033 addItemWidget(m_createDirBox); 0034 m_createDirBox->setChecked(true); 0035 QHBoxLayout *tmpLayout = new QHBoxLayout(); 0036 m_noIgnore = new QCheckBox(this); 0037 m_noIgnore->setText(i18n("No ignore")); 0038 m_noIgnore->setToolTip(i18n("If set, add files or directories that match ignore patterns.")); 0039 tmpLayout->addWidget(m_noIgnore); 0040 // LogmessageDataLayout->addWidget(m_createDirBox); 0041 if (svn::Version::version_major() > 1 || svn::Version::version_minor() > 4) { 0042 m_ignoreUnknownNodes = new QCheckBox(this); 0043 m_ignoreUnknownNodes->setText(i18n("Ignore unknown node types")); 0044 m_ignoreUnknownNodes->setToolTip(i18n("Should files with unknown node types be ignored")); 0045 m_ignoreUnknownNodes->setWhatsThis(i18n("Ignore files of which the node type is unknown, such as device files and pipes.")); 0046 tmpLayout->addWidget(m_ignoreUnknownNodes); 0047 // addItemWidget(m_ignoreUnknownNodes); 0048 } else { 0049 m_ignoreUnknownNodes = nullptr; 0050 } 0051 QSpacerItem *m_leftspacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 0052 tmpLayout->addItem(m_leftspacer); 0053 if (layout()) { 0054 layout()->addItem(tmpLayout); 0055 } 0056 } 0057 0058 Importdir_logmsg::~Importdir_logmsg() 0059 { 0060 } 0061 0062 bool Importdir_logmsg::noIgnore() 0063 { 0064 return m_noIgnore->isChecked(); 0065 } 0066 0067 bool Importdir_logmsg::ignoreUnknownNodes() 0068 { 0069 return m_ignoreUnknownNodes ? m_ignoreUnknownNodes->isChecked() : false; 0070 } 0071 0072 bool Importdir_logmsg::createDir() 0073 { 0074 return m_createDirBox->isChecked(); 0075 } 0076 0077 void Importdir_logmsg::createDirboxDir(const QString &which) 0078 { 0079 m_createDirBox->setText(i18n("Create subdirectory %1 on import", (which.isEmpty() ? i18n("(Last part)") : which))); 0080 } 0081 0082 #include "moc_importdir_logmsg.cpp"