~ubuntu-branches/ubuntu/natty/recorditnow/natty

« back to all changes in this revision

Viewing changes to src/libs/recorder/abstractrecorder.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2009-11-26 16:50:53 UTC
  • Revision ID: james.westby@ubuntu.com-20091126165053-yifjycveb8j7yt8r
Tags: upstream-0.4
Import upstream version 0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2009 by Kai Dombrowe <just89@gmx.de>                    *
 
3
 *                                                                         *
 
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.                                   *
 
8
 *                                                                         *
 
9
 *   This program is distributed in the hope that it will be useful,       *
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
12
 *   GNU General Public License for more details.                          *
 
13
 *                                                                         *
 
14
 *   You should have received a copy of the GNU General Public License     *
 
15
 *   along with this program; if not, write to the                         *
 
16
 *   Free Software Foundation, Inc.,                                       *
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
 
18
 ***************************************************************************/
 
19
 
 
20
 
 
21
// own
 
22
#include "abstractrecorder.h"
 
23
 
 
24
// KDE
 
25
#include <kglobal.h>
 
26
#include <kstandarddirs.h>
 
27
#include <klocalizedstring.h>
 
28
#include <kdebug.h>
 
29
 
 
30
// Qt
 
31
#include <QtCore/QDir>
 
32
 
 
33
 
 
34
AbstractRecorder::AbstractRecorder(QObject *parent, const QVariantList &args)
 
35
    : RecordItNowPlugin(parent)
 
36
{
 
37
 
 
38
    Q_UNUSED(args);
 
39
    m_state = Idle;
 
40
 
 
41
}
 
42
 
 
43
 
 
44
AbstractRecorder::~AbstractRecorder()
 
45
{
 
46
 
 
47
 
 
48
 
 
49
 
 
50
}
 
51
 
 
52
 
 
53
AbstractRecorder::State AbstractRecorder::state() const
 
54
{
 
55
 
 
56
    return m_state;
 
57
 
 
58
}
 
59
 
 
60
 
 
61
void AbstractRecorder::setState(const AbstractRecorder::State &newState)
 
62
{
 
63
 
 
64
    if (m_state == newState) {
 
65
        return;
 
66
    }
 
67
    m_state = newState;
 
68
    emit stateChanged(newState);
 
69
 
 
70
}
 
71
 
 
72
 
 
73
 
 
74
#include "abstractrecorder.moc"
 
75