File indexing completed on 2024-04-28 05:42:01
0001 /*************************************************************************** 0002 * Copyright (C) 2006-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 "loaddmpdlg_impl.h" 0021 0022 LoadDmpDlg_impl::LoadDmpDlg_impl(QWidget *parent) 0023 : QWidget(parent) 0024 { 0025 setupUi(this); 0026 m_Dumpfile->setMode(KFile::File); 0027 m_Repository->setMode(KFile::Directory | KFile::LocalOnly); 0028 } 0029 0030 LoadDmpDlg_impl::~LoadDmpDlg_impl() 0031 { 0032 } 0033 0034 /*! 0035 \fn LoadDmpDlg_impl::usePost()const 0036 */ 0037 bool LoadDmpDlg_impl::usePost() const 0038 { 0039 return m_UsePost->isChecked(); 0040 } 0041 0042 /*! 0043 \fn LoadDmpDlg_impl::usePre()const 0044 */ 0045 bool LoadDmpDlg_impl::usePre() const 0046 { 0047 return m_UsePre->isChecked(); 0048 } 0049 0050 bool LoadDmpDlg_impl::validateProps() const 0051 { 0052 return m_validateProps->isChecked(); 0053 } 0054 0055 /*! 0056 \fn LoadDmpDlg_impl::uuidAction()const 0057 */ 0058 int LoadDmpDlg_impl::uuidAction() const 0059 { 0060 if (m_UUidForce->isChecked()) { 0061 return 2; 0062 } else if (m_UUidIgnore->isChecked()) { 0063 return 1; 0064 } 0065 return 0; 0066 } 0067 0068 /*! 0069 \fn LoadDmpDlg_impl::dumpFile()const 0070 */ 0071 QUrl LoadDmpDlg_impl::dumpFile() const 0072 { 0073 return m_Dumpfile->url(); 0074 } 0075 0076 /*! 0077 \fn LoadDmpDlg_impl::repository()const 0078 */ 0079 QString LoadDmpDlg_impl::repository() const 0080 { 0081 return m_Repository->url().toLocalFile(); 0082 } 0083 0084 /*! 0085 \fn LoadDmpDlg_impl::parentPath()const 0086 */ 0087 QString LoadDmpDlg_impl::parentPath() const 0088 { 0089 QString res = m_Rootfolder->text(); 0090 while (res.endsWith(QLatin1Char('/'))) { 0091 res.chop(1); 0092 } 0093 return res; 0094 } 0095 0096 #include "moc_loaddmpdlg_impl.cpp"