• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KIO

defaultviewadapter.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *   Copyright (C) 2008 by Peter Penz <peter.penz@gmx.at>                      *
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; either              *
00007  *   version 2 of the License, or (at your option) any later version.          *
00008  *                                                                             *
00009  *   This library is distributed in the hope that it will be useful,           *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00012  *   Library General Public License for more details.                          *
00013  *                                                                             *
00014  *   You should have received a copy of the GNU Library General Public License *
00015  *   along with this library; see the file COPYING.LIB.  If not, write to      *
00016  *   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
00017  *   Boston, MA 02110-1301, USA.                                               *
00018  *******************************************************************************/
00019 
00020 #include "defaultviewadapter_p.h"
00021 
00022 #include <QAbstractItemView>
00023 #include <QScrollBar>
00024 
00025 namespace KIO
00026 {
00027 
00028 DefaultViewAdapter::DefaultViewAdapter(QAbstractItemView* view, QObject* parent) :
00029     KAbstractViewAdapter(parent),
00030     m_view(view)
00031 {
00032 }
00033 
00034 QAbstractItemModel *DefaultViewAdapter::model() const
00035 {
00036     return m_view->model();
00037 }
00038 
00039 QSize DefaultViewAdapter::iconSize() const
00040 {
00041     return m_view->iconSize();
00042 }
00043 
00044 QPalette DefaultViewAdapter::palette() const
00045 {
00046     return m_view->palette();
00047 }
00048 
00049 QRect DefaultViewAdapter::visibleArea() const
00050 {
00051     return m_view->viewport()->rect();
00052 }
00053 
00054 QRect DefaultViewAdapter::visualRect(const QModelIndex& index) const
00055 {
00056     return m_view->visualRect(index);
00057 }
00058 
00059 void DefaultViewAdapter::connect(Signal signal, QObject* receiver, const char* slot)
00060 {
00061     if (signal == ScrollBarValueChanged) {
00062         QObject::connect(m_view->horizontalScrollBar(), SIGNAL(valueChanged(int)), receiver, slot);
00063         QObject::connect(m_view->verticalScrollBar(), SIGNAL(valueChanged(int)), receiver, slot);
00064     }
00065 }
00066 
00067 }
00068 

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal