~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to kate/interfaces/projectmanager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License version 2 as published by the Free Software Foundation.
 
7
 
 
8
   This library is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
   Library General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU Library General Public License
 
14
   along with this library; see the file COPYING.LIB.  If not, write to
 
15
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
16
   Boston, MA 02111-1307, USA.
 
17
*/
 
18
 
 
19
#include "projectmanager.h"
 
20
#include "projectmanager.moc"
 
21
 
 
22
#include "application.h"
 
23
 
 
24
#include "../app/kateprojectmanager.h"
 
25
 
 
26
namespace Kate
 
27
{
 
28
 
 
29
class PrivateProjectManager
 
30
  {
 
31
  public:
 
32
    PrivateProjectManager ()
 
33
    {
 
34
    }
 
35
 
 
36
    ~PrivateProjectManager ()
 
37
    {    
 
38
    }          
 
39
        
 
40
    KateProjectManager *projectMan; 
 
41
  };
 
42
            
 
43
ProjectManager::ProjectManager (void *projectManager) : QObject ((KateProjectManager*) projectManager)
 
44
{
 
45
  d = new PrivateProjectManager ();
 
46
  d->projectMan = (KateProjectManager*) projectManager;
 
47
}
 
48
 
 
49
ProjectManager::~ProjectManager ()
 
50
{
 
51
  delete d;
 
52
}
 
53
 
 
54
Project *ProjectManager::create (const QString &type, const QString &name, const QString &filename)
 
55
{
 
56
  return d->projectMan->create (type, name, filename);
 
57
}
 
58
    
 
59
Project *ProjectManager::open (const QString &filename)
 
60
{
 
61
  return d->projectMan->open (filename);
 
62
}
 
63
 
 
64
bool ProjectManager::close (Kate::Project *project)
 
65
{
 
66
  return d->projectMan->close (project);
 
67
}
 
68
 
 
69
Project *ProjectManager::project (uint n)
 
70
{
 
71
  return d->projectMan->project (n);
 
72
}
 
73
 
 
74
uint ProjectManager::projects ()
 
75
{
 
76
  return d->projectMan->projects ();
 
77
}
 
78
 
 
79
ProjectManager *projectManager ()
 
80
{
 
81
  return application()->projectManager ();
 
82
}
 
83
 
 
84
}
 
85