~ubuntu-branches/debian/sid/kxstitch/sid

« back to all changes in this revision

Viewing changes to kxstitch/flossscheme.h

  • Committer: Bazaar Package Importer
  • Author(s): eric pareja
  • Date: 2005-02-19 12:37:22 UTC
  • Revision ID: james.westby@ubuntu.com-20050219123722-kt3ru1nqvllietee
Tags: upstream-0.6
ImportĀ upstreamĀ versionĀ 0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2003 by Stephen Allewell                                *
 
3
 *   stephen@mirramar.fsnet.co.uk                                          *
 
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
#ifndef FLOSSSCHEME_H
 
12
#define FLOSSSCHEME_H
 
13
 
 
14
#include <qstring.h>
 
15
#include <qptrlist.h>
 
16
#include "floss.h"
 
17
 
 
18
/** FlossScheme details a set of flosses attributed to a specific palette.
 
19
    This may be a floss manufacturers scheme, eg DMC, Anchor, etc,
 
20
    or a user can create their own schemes which can
 
21
    then be used as a basis for new patterns or
 
22
    importing pictures.
 
23
    @author Stephen P Allewell
 
24
  */
 
25
class FlossScheme
 
26
{
 
27
public:
 
28
/** Constructor
 
29
  */
 
30
  FlossScheme();
 
31
 
 
32
/** Get the name of this scheme.
 
33
    @return The name of the scheme.
 
34
  */
 
35
  QString schemeName();
 
36
 
 
37
/** Set the scheme name.
 
38
    @param name The name to use.
 
39
  */
 
40
  void setSchemeName(QString name);
 
41
/** Add a floss to this scheme.
 
42
    @param floss Pointer to the floss to be added.
 
43
  */
 
44
  void addFloss(Floss *floss);
 
45
/** Find a floss by name.
 
46
    @return A pointer to the floss. Returns NULL if no floss found by that name.
 
47
    @param name The name of the floss required.
 
48
  */
 
49
  Floss *find(QString name);
 
50
/** Get an iterator to the list of flosses.
 
51
    @return A QListIterator for the Floss class.
 
52
  */
 
53
  QPtrListIterator<Floss> flossIterator();
 
54
/** Clear the contents of the scheme
 
55
  */
 
56
  void clearScheme();
 
57
 
 
58
private:
 
59
  QString          m_name;
 
60
  QPtrList<Floss>  m_flosses;
 
61
};
 
62
 
 
63
#endif