kate Library API Documentation

kateviewspace.cpp

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #include "kateviewspace.h"
00022 #include "kateviewspace.moc"
00023 
00024 #include "katemainwindow.h"
00025 #include "kateviewmanager.h"
00026 #include "katedocmanager.h"
00027 #include "kateapp.h"
00028 
00029 #include <kiconloader.h>
00030 #include <klocale.h>
00031 #include <ksqueezedtextlabel.h>
00032 #include <kconfig.h>
00033 #include <kdebug.h>
00034 
00035 #include <qwidgetstack.h>
00036 #include <qpainter.h>
00037 #include <qlabel.h>
00038 #include <qcursor.h>
00039 #include <qpopupmenu.h>
00040 #include <qpixmap.h>
00041 
00042 //BEGIN KVSSBSep
00043 /*
00044    "KateViewSpaceStatusBarSeparator"
00045    A 2 px line to separate the statusbar from the view.
00046    It is here to compensate for the lack of a frame in the view,
00047    I think Kate looks very nice this way, as QScrollView with frame
00048    looks slightly clumsy...
00049    Slight 3D effect. I looked for suitable QStyle props or methods,
00050    but found none, though maybe it should use QStyle::PM_DefaultFrameWidth
00051    for height (TRY!).
00052    It does look a bit funny with flat styles (Light, .Net) as is,
00053    but there are on methods to paint panel lines separately. And,
00054    those styles tends to look funny on their own, as a light line
00055    in a 3D frame next to a light contents widget is not functional.
00056    Also, QStatusBar is up to now completely ignorant to style.
00057    -anders
00058 */
00059 class KVSSBSep : public QWidget {
00060 public:
00061   KVSSBSep( KateViewSpace *parent=0) : QWidget(parent)
00062   {
00063     setFixedHeight( 2 );
00064   }
00065 protected:
00066   void paintEvent( QPaintEvent *e )
00067   {
00068     QPainter p( this );
00069     p.setPen( colorGroup().shadow() );
00070     p.drawLine( e->rect().left(), 0, e->rect().right(), 0 );
00071     p.setPen( ((KateViewSpace*)parentWidget())->isActiveSpace() ? colorGroup().light() : colorGroup().midlight() );
00072     p.drawLine( e->rect().left(), 1, e->rect().right(), 1 );
00073   }
00074 };
00075 //END KVSSBSep
00076 
00077 //BEGIN KateViewSpace
00078 KateViewSpace::KateViewSpace( KateViewManager *viewManager,
00079                               QWidget* parent, const char* name )
00080   : QVBox(parent, name),
00081     m_viewManager( viewManager )
00082 {
00083   mViewList.setAutoDelete(false);
00084 
00085   stack = new QWidgetStack( this );
00086   setStretchFactor(stack, 1);
00087   stack->setFocus();
00088   seplow">return m_viewManager; };
4 the KDE developers.
Generated on Sun Aug 20 13:39:05 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003
./usr/share/doc/kde/HTML/en/kdebase-apidocs/kate/html/kateviewspace_8cpp-source.html0000644000000000000000000005631710472062771030443 0ustar rootroot00000000000000 kate Library: kateviewspace.cpp Source File (kate Library)

kate Library API Documentation

kateviewspace.cpp

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #include "kateviewspace.h"
00022 #include "kateviewspace.moc"
00023 
00024 #include "katemainwindow.h"
00025 #include "kateviewmanager.h"
00026 #include "katedocmanager.h"
00027 #include "kateapp.h"
00028 
00029 #include <kiconloader.h>
00030 #include <klocale.h>
00031 #include <ksqueezedtextlabel.h>
00032 #include <kconfig.h>
00033 #include <kdebug.h>
00034 
00035 #include <qwidgetstack.h>
00036 #include <qpainter.h>
00037 #include <qlabel.h>
00038 #include <qcursor.h>
00039 #include <qpopupmenu.h>
00040 #include <qpixmap.h>
00041 
00042 //BEGIN KVSSBSep
00043 /*
00044    "KateViewSpaceStatusBarSeparator"
00045    A 2 px line to separate the statusbar from the view.
00046    It is here to compensate for the lack of a frame in the view,
00047    I think Kate looks very nice this way, as QScrollView with frame
00048    looks slightly clumsy...
00049    Slight 3D effect. I looked for suitable QStyle props or methods,
00050    but found none, though maybe it should use QStyle::PM_DefaultFrameWidth
00051    for height (TRY!).
00052    It does look a bit funny with flat styles (Light, .Net) as is,
00053    but there are on methods to paint panel lines separately. And,
00054    those styles tends to look funny on their own, as a light line
00055    in a 3D frame next to a light contents widget is not functional.
00056    Also, QStatusBar is up to now completely ignorant to style.
00057    -anders
00058 */
00059 class KVSSBSep : public QWidget {
00060 public:
00061   KVSSBSep( KateViewSpace *parent=0) : QWidget(parent)
00062   {
00063     setFixedHeight( 2 );
00064   }
00065 protected:
00066   void paintEvent( QPaintEvent *e )
00067   {
00068     QPainter p( this );
00069     p.setPen( colorGroup().shadow() );
00070     p.drawLine( e->rect().left(), 0, e->rect().right(), 0 );
00071     p.setPen( ((KateViewSpace*)parentWidget())->isActiveSpace() ? colorGroup().light() : colorGroup().midlight() );
00072     p.drawLine( e->rect().left(), 1, e->rect().right(), 1 );
00073   }
00074 };
00075 //END KVSSBSep
00076 
00077 //BEGIN KateViewSpace
00078 KateViewSpace::KateViewSpace( KateViewManager *viewManager,
00079                               QWidget* parent, const char* name )
00080   : QVBox(parent, name),
00081     m_viewManager( viewManager )
00082 {
00083   mViewList.setAutoDelete(false);
00084 
00085   stack = new QWidgetStack( this );
00086   setStretchFactor(stack, 1);
00087   stack->setFocus();
00088   seplow">return m_viewManager; };
4 the KDE developers.
Generated on Sun Aug 20 13:39:05 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003
./usr/share/doc/kde/HTML/en/kdebase-apidocs/kate/html/kateviewspace_8cpp-source.html0000644000000000000000000005631710472062771030443 0ustar rootroot00000000000000 kate Library: kateviewspace.cpp Source File (kate Library)

kateviewspace.cpp

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #include "kateviewspace.h"
00022 #include "kateviewspace.moc"
00023 
00024 #include "katemainwindow.h"
00025 #include "kateviewmanager.h"
00026 #include "katedocmanager.h"
00027 #include "kateapp.h"
00028 
00029 #include <kiconloader.h>
00030 #include <klocale.h>
00031 #include <ksqueezedtextlabel.h>
00032 #include <kconfig.h>
00033 #include <kdebug.h>
00034 
00035 #include <qwidgetstack.h>
00036 #include <qpainter.h>
00037 #include <qlabel.h>
00038 #include <qcursor.h>
00039 #include <qpopupmenu.h>
00040 #include <qpixmap.h>
00041 
00042 //BEGIN KVSSBSep
00043 /*
00044    "KateViewSpaceStatusBarSeparator"
00045    A 2 px line to separate the statusbar from the view.
00046    It is here to compensate for the lack of a frame in the view,
00047    I think Kate looks very nice this way, as QScrollView with frame
00048    looks slightly clumsy...
00049    Slight 3D effect. I looked for suitable QStyle props or methods,
00050    but found none, though maybe it should use QStyle::PM_DefaultFrameWidth
00051    for height (TRY!).
00052    It does look a bit funny with flat styles (Light, .Net) as is,
00053    but there are on methods to paint panel lines separately. And,
00054    those styles tends to look funny on their own, as a light line
00055    in a 3D frame next to a light contents widget is not functional.
00056    Also, QStatusBar is up to now completely ignorant to style.
00057    -anders
00058 */
00059 class KVSSBSep : public QWidget {
00060 public:
00061   KVSSBSep( KateViewSpace *parent=0) : QWidget(parent)
00062   {
00063     setFixedHeight( 2 );
00064   }
00065 protected:
00066   void paintEvent( QPaintEvent *e )
00067   {
00068     QPainter p( this );
00069     p.setPen( colorGroup().shadow() );
00070     p.drawLine( e->rect().left(), 0, e->rect().right(), 0 );
00071     p.setPen( ((KateViewSpace*)parentWidget())->isActiveSpace() ? colorGroup().light() : colorGroup().midlight() );
00072     p.drawLine( e->rect().left(), 1, e->rect().right(), 1 );
00073   }
00074 };
00075 //END KVSSBSep
00076 
00077 //BEGIN KateViewSpace
00078 KateViewSpace::KateViewSpace( KateViewManager *viewManager,
00079                               QWidget* parent, const char* name )
00080   : QVBox(parent, name),
00081     m_viewManager( viewManager )
00082 {
00083   mViewList.setAutoDelete(false);
00084 
00085   stack = new QWidgetStack( this );
00086   setStretchFactor(stack, 1);
00087   stack->setFocus();
00088   seplow">return m_viewManager; }