File indexing completed on 2024-05-12 05:44:24
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 "revisionbuttonimpl.h" 0021 #include "settings/kdesvnsettings.h" 0022 #include "svnfrontend/fronthelpers/rangeinput_impl.h" 0023 0024 RevisionButtonImpl::RevisionButtonImpl(QWidget *parent) 0025 : QWidget(parent) 0026 , m_Rev(svn::Revision::UNDEFINED) 0027 , m_noWorking(false) 0028 { 0029 setupUi(this); 0030 } 0031 0032 void RevisionButtonImpl::setRevision(const svn::Revision &aRev) 0033 { 0034 m_Rev = aRev; 0035 m_RevisionButton->setText(m_Rev.toString()); 0036 emit revisionChanged(); 0037 } 0038 0039 void RevisionButtonImpl::askRevision() 0040 { 0041 Rangeinput_impl::revision_range range; 0042 if (Rangeinput_impl::getRevisionRange(range, !m_noWorking, true, m_Rev)) { 0043 setRevision(range.first); 0044 } 0045 } 0046 0047 void RevisionButtonImpl::setNoWorking(bool how) 0048 { 0049 m_noWorking = how; 0050 } 0051 0052 #include "moc_revisionbuttonimpl.cpp"