~ubuntu-branches/ubuntu/quantal/aqsis/quantal

« back to all changes in this revision

Viewing changes to tools/piqsl/book.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2009-08-06 04:53:26 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090806045326-z6xeaaao62idxcc6
Tags: 1.6.0-0ubuntu1
* New upstream release
* debian/control:
  - changed name of lib package to libaqsis1 instead of aqsis-libsc2a
  - changed name of dev package to libaqsis-dev instead of aqsis-libs-dev
  - Added aqsis-data package
  - Revised summary text according to that specified by the RISpec (Pixar)
* Moved examples installation from aqsis.install to aqsis-data.install
* debian/rules: 
  - added content to binary-indep target
* debian/rules: added explicit name of mime file to force dh_installmime
  to generate postinst and prerm scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Aqsis
 
2
// Copyright (C) 1997 - 2001, Paul C. Gregory
 
3
//
 
4
// Contact: pgregory@aqsis.org
 
5
//
 
6
// This library is free software; you can redistribute it and/or
 
7
// modify it under the terms of the GNU General Public
 
8
// License as published by the Free Software Foundation; either
 
9
// version 2 of the License, or (at your option) any later version.
 
10
//
 
11
// This library is distributed in the hope that it will be useful,
 
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
// General Public License for more details.
 
15
//
 
16
// You should have received a copy of the GNU General Public
 
17
// License along with this library; if not, write to the Free Software
 
18
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 
 
20
 
 
21
/** \file
 
22
                \brief Implements the common book class functionality.
 
23
                \author Paul C. Gregory (pgregory@aqsis.org)
 
24
*/
 
25
 
 
26
#include "book.h"
 
27
#include "image.h"
 
28
 
 
29
 
 
30
namespace Aqsis {
 
31
 
 
32
CqBook::CqBook( const std::string& name ) : m_name(name)
 
33
{
 
34
//      m_framebuffer = boost::shared_ptr<CqFramebuffer>(
 
35
//                      new CqFramebuffer(CqFramebuffer::defaultWidth,
 
36
//                              CqFramebuffer::defaultHeight, 3, name));
 
37
//      m_framebuffer->show();
 
38
}
 
39
 
 
40
 
 
41
std::vector<boost::shared_ptr<CqImage> >::size_type CqBook::addImage(boost::shared_ptr<CqImage>& image)
 
42
{
 
43
        m_images.push_back(image);
 
44
        return(m_images.size()-1);
 
45
}
 
46
 
 
47
boost::shared_ptr<CqImage> CqBook::image(CqBook::TqImageList::size_type index)
 
48
{
 
49
        if(m_images.size() > index)
 
50
                return(m_images[index]);
 
51
        else
 
52
        {
 
53
                boost::shared_ptr<CqImage> t;
 
54
                return(t);
 
55
        }
 
56
}
 
57
 
 
58
void CqBook::setName( const std::string& name )
 
59
{
 
60
        m_name = name;
 
61
//      if(m_framebuffer)
 
62
//              m_framebuffer->setBookName(name);
 
63
}
 
64
 
 
65
void CqBook::removeImage(TqImageListIterator item)
 
66
{
 
67
        if(item != m_images.end())
 
68
        {
 
69
//              if(framebuffer()->image() == (*item))
 
70
//              {
 
71
//                      framebuffer()->disconnect();
 
72
//              }
 
73
                m_images.erase(item);
 
74
        }
 
75
}
 
76
 
 
77
} // namespace Aqsis
 
78