kword

KWFrameList.h

00001 /* This file is part of the KOffice project
00002  * Copyright (C) 2005 Thomas Zander <zander@kde.org>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; version 2.
00007 
00008  * This library is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  * Library General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU Library General Public License
00014  * along with this library; see the file COPYING.LIB.  If not, write to
00015  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  * Boston, MA 02110-1301, USA.
00017  */
00018 #ifndef kw_framelist_h
00019 #define kw_framelist_h
00020 
00021 #include "KWFrame.h"
00022 
00023 #include <qptrlist.h>
00024 #include <qvaluevector.h>
00025 
00026 class KWDocument;
00027 
00032 class KWFrameList {
00033 public:
00039     KWFrameList(KWDocument *doc, KWFrame *theFrame);
00040 
00044     QValueList<KWFrame *> framesBelow() const;
00045 
00049     QValueList<KWFrame *> framesOnTop() const;
00050 
00058     void updateAfterMove(int oldPageNum);
00059 
00064     void update();
00065 
00070     static void recalcAllFrames(KWDocument *doc);
00071 
00078     static void recalcFrames(KWDocument *doc, int pageFrom, int pageTo);
00079 
00086     static void createFrameList(KWFrame *f, KWDocument *doc);
00087 
00099     static void createFrameList(KWFrameSet *fs, KWDocument *doc, bool forceUpdate=true);
00100 
00101 private:
00102     static KWFrameList *getFirstFrameList(KWDocument *doc);
00103     void updateZOrderFor(const QPtrList<KWFrame> &frames);
00104     void setFrames(const QPtrList<KWFrame> &frames);
00105 
00106     QValueVector<KWFrame *> m_frames; // sorted by Z Order
00107     KWDocument *m_doc;
00108     KWFrame *m_frame;
00109 };
00110 
00111 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys