~ubuntu-branches/debian/sid/calligraplan/sid

« back to all changes in this revision

Viewing changes to src/libs/main/KoFilterChainLinkList.h

  • Committer: Package Import Robot
  • Author(s): Pino Toscano
  • Date: 2018-02-01 18:20:19 UTC
  • Revision ID: package-import@ubuntu.com-20180201182019-1qo7qaim5wejm5k9
Tags: upstream-3.1.0
ImportĀ upstreamĀ versionĀ 3.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the Calligra libraries
 
2
   Copyright (C) 2009 Boudewijn Rempt <boud@valdyas.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 as published by the Free Software Foundation; either
 
7
version 2 of the License, or (at your option) any later version.
 
8
 
 
9
This library 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 GNU
 
12
Library General Public License for more details.
 
13
 
 
14
You should have received a copy of the GNU Library General Public License
 
15
along with this library; see the file COPYING.LIB.  If not, write to
 
16
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
17
Boston, MA 02110-1301, USA.
 
18
*/
 
19
#ifndef KOFILTERCHAINLINKLIST_H
 
20
#define KOFILTERCHAINLINKLIST_H
 
21
 
 
22
#include <QList>
 
23
 
 
24
namespace CalligraFilter {
 
25
 
 
26
    class ChainLink;
 
27
 
 
28
 
 
29
    class ChainLinkList
 
30
    {
 
31
    public:
 
32
        ChainLinkList();
 
33
        ~ChainLinkList();
 
34
 
 
35
        void deleteAll();
 
36
        int count() const;
 
37
 
 
38
        /**
 
39
         * Return a pointer to the current position in the chain.
 
40
         * @return pointer to the current ChainLink or 0 if the ChainLinkList is empty.
 
41
         **/
 
42
        ChainLink* current() const;
 
43
 
 
44
        /**
 
45
         * Move the position to the first position in the chain.
 
46
         * @return pointer to the first ChainLink or 0 if the ChainLinkList is empty.
 
47
         **/
 
48
        ChainLink* first();
 
49
 
 
50
        ChainLink* next();
 
51
 
 
52
        void prepend(ChainLink* link);
 
53
 
 
54
        void append(ChainLink* link);
 
55
 
 
56
    private:
 
57
 
 
58
        QList<ChainLink*> m_chainLinks;
 
59
        int m_current;
 
60
 
 
61
    };
 
62
 
 
63
}
 
64
 
 
65
#endif // KOFILTERCHAINLINKLIST_H