1
/***************************************************************************
2
* Copyright (C) 2003 by Mario Scalas *
3
* mario.scalas@libero.it *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
10
***************************************************************************/
12
#include <qlineedit.h>
13
#include <qradiobutton.h>
15
#include "diffdialog.h"
17
#include <qbuttongroup.h>
19
///////////////////////////////////////////////////////////////////////////////
21
///////////////////////////////////////////////////////////////////////////////
23
DiffDialog::DiffDialog( const CVSEntry &entry, QWidget *parent, const char *name, WFlags f )
24
: DiffDialogBase( parent, name, true, f)
27
QString currentRevision = entry.revision();
28
revaEdit->setText(currentRevision);
29
revbEdit->setText(currentRevision);
30
revOtherEdit->setText(currentRevision);
34
///////////////////////////////////////////////////////////////////////////////
36
DiffDialog::~DiffDialog()
40
///////////////////////////////////////////////////////////////////////////////
42
DiffDialog::DiffType DiffDialog::requestedDiff() const
44
if (diffArbitraryRevRadio->isChecked())
46
else if (diffLocalOtherRadio->isChecked())
47
return diffLocalOther;
48
else if (diffLocalBaseRadio->isChecked())
54
///////////////////////////////////////////////////////////////////////////////
56
QString DiffDialog::revA() const
58
if (requestedDiff() == diffArbitrary)
59
return revaEdit->text();
60
else if (requestedDiff() == diffLocalOther)
61
return revOtherEdit->text();
62
else if (requestedDiff() == diffLocalHEAD)
68
///////////////////////////////////////////////////////////////////////////////
70
QString DiffDialog::revB() const
73
return this->revbEdit->text();
78
///////////////////////////////////////////////////////////////////////////////
80
void DiffDialog::languageChange() {
81
DiffDialogBase::languageChange();
82
//buttonGroup1->setTitle( tr2i18n( "Build Difference Between" ) );
84
//FIXME: We need a function in CVSEntry to return the latest revision there is in cvs
85
// if(!m_entry.revision().isNull())
86
// diffLocalHeadRadio->setText( tr2i18n( "Local copy and &HEAD (%1)" ).arg( m_entry.revision()) );
89
#include "diffdialog.moc"