~ubuntu-branches/debian/sid/chessx/sid

« back to all changes in this revision

Viewing changes to src/database/database.cpp

  • Committer: Package Import Robot
  • Author(s): Niklas Fiekas
  • Date: 2013-10-31 17:02:37 UTC
  • Revision ID: package-import@ubuntu.com-20131031170237-wghf5j9jlv28gmls
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   (C) 2005-2006 William Hoggarth <whoggarth@users.sourceforge.net       *
 
3
 *   (C) 2007-2009 Michal Rudolf <mrudolf@kdewebdev.org>                   *
 
4
 *                                                                         *
 
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.                                   *
 
9
 ***************************************************************************/
 
10
 
 
11
#include <QFile>
 
12
#include <QFileInfo>
 
13
#include <QtDebug>
 
14
#include "database.h"
 
15
 
 
16
Database::Database() : m_break(false)
 
17
{
 
18
    connect(&m_index, SIGNAL(progress(int)), this, SIGNAL(progress(int)));
 
19
}
 
20
 
 
21
Database::~Database()
 
22
{
 
23
}
 
24
 
 
25
Index* Database::index()
 
26
{
 
27
    return &m_index;
 
28
}
 
29
 
 
30
const Index* Database::index() const
 
31
{
 
32
    return &m_index;
 
33
}
 
34
 
 
35
QString Database::name() const
 
36
{
 
37
    QFileInfo fi(filename());
 
38
    return fi.completeBaseName();
 
39
}
 
40