1 /***************************************************************************
2 * Copyright 2007 Robert Gruber <rgruber@users.sourceforge.net> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 ***************************************************************************/
17 #include "ui_logview.h"
24 * This is a helper class for the LogView::parseOutput() method.
25 * It holds information about a single revision of a file.
26 * @see LogView::parseOutput()
37 * Shows the output from @code cvs log @endcode in a nice way.
38 * Create a CvsJob by calling CvsProxy::log() and connect the job's
39 * result(KJob*) signal to LogView::slotJobFinished(KJob* job)
40 * @author Robert Gruber <rgruber@users.sourceforge.net>
42 class LogView
: public QWidget
, private Ui::LogViewBase
46 explicit LogView(CvsPlugin
* plugin
, CvsJob
* job
=0, QWidget
*parent
= 0);
50 * Parses the output generated by a @code cvs log @endcode command and
51 * fills the given QList with all revision infos found in the given output.
52 * @param jobOutput Pass in the plain output of a @code cvs log @endcode job
53 * @param revisions Will be filled with all revision infos found in @p jobOutput
55 static void parseOutput(const QString
& jobOutput
,
56 QList
<CvsRevision
>& revisions
);
60 * Connect a job's result() signal to this slot. When called, the output from the job
61 * will be passed to the parseOutput() method and all found revisions will be displayed.
62 * @note If you pass a CvsJob object to the ctor, it's result() signal
63 * will automatically be connected to this slot.
65 void slotJobFinished(KJob
* job
);