File indexing completed on 2024-04-28 05:42:02

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 #ifndef MERGEDLG_IMPL_H
0021 #define MERGEDLG_IMPL_H
0022 
0023 #include "rangeinput_impl.h"
0024 #include "ui_merge_dlg.h"
0025 
0026 namespace svn
0027 {
0028 class MergeParameter;
0029 }
0030 
0031 class MergeDlg_impl : public QWidget, public Ui::MergeDlg
0032 {
0033     Q_OBJECT
0034 public:
0035     explicit MergeDlg_impl(QWidget *parent = nullptr, bool src1 = true, bool src2 = true, bool out = true, bool record_only = true, bool reintegrate = true);
0036     ~MergeDlg_impl() override;
0037 
0038     bool recursive() const;
0039     bool force() const;
0040     bool ignorerelated() const;
0041     bool dryrun() const;
0042     bool useExtern() const;
0043     bool recordOnly() const;
0044     bool reintegrate() const;
0045     bool allowmixedrevs() const;
0046 
0047     QString Src1() const;
0048     QString Src2() const;
0049     QString Dest() const;
0050     Rangeinput_impl::revision_range getRange() const;
0051 
0052     void setSrc1(const QString &);
0053     void setSrc2(const QString &);
0054     void setDest(const QString &);
0055 
0056     //! simple caller
0057     /*!
0058      * This simplyfies the call if only some revision into a working copy should merged.
0059      */
0060     static bool getMergeRange(Rangeinput_impl::revision_range &range,
0061                               bool *force,
0062                               bool *recursive,
0063                               bool *ignorerelated,
0064                               bool *dry,
0065                               bool *useExternal,
0066                               bool *allowmixedrevs,
0067                               QWidget *parent = nullptr);
0068 protected Q_SLOTS:
0069     virtual void externDisplayToggled(bool);
0070     virtual void recordOnlyToggled(bool);
0071     virtual void reintegrateToggled(bool);
0072 };
0073 
0074 #endif