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

kjots

  • sources
  • kde-4.12
  • kdepim
  • kjots
  • plasmoid
plasmatreeview.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Marco Martin <notmart@gmail.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program 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
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #include "plasmatreeview.h"
21 
22 #include <QHeaderView>
23 #include <QScrollBar>
24 
25 #include <kiconloader.h>
26 
27 #include <akonadi/entitytreeview.h>
28 
29 // #include "private/style_p.h"
30 
31 namespace Akonadi
32 {
33 
34 class TreeViewPrivate
35 {
36 public:
37 // Plasma::Style::Ptr style;
38 };
39 
40 PlasmaTreeView::PlasmaTreeView(QGraphicsWidget *parent)
41  : QGraphicsProxyWidget(parent),
42  d(new TreeViewPrivate)
43 {
44  EntityTreeView *native = new EntityTreeView;
45  setWidget(native);
46  native->setAttribute(Qt::WA_NoSystemBackground);
47  native->setFrameStyle(QFrame::NoFrame);
48 
49 // d->style = Plasma::Style::sharedStyle();
50 // native->verticalScrollBar()->setStyle(d->style.data());
51 // native->horizontalScrollBar()->setStyle(d->style.data());
52 }
53 
54 PlasmaTreeView::~PlasmaTreeView()
55 {
56  delete d;
57 // Plasma::Style::doneWithSharedStyle();
58 }
59 
60 void PlasmaTreeView::setModel(QAbstractItemModel *model)
61 {
62  nativeWidget()->setModel(model);
63 }
64 
65 QAbstractItemModel *PlasmaTreeView::model()
66 {
67  return nativeWidget()->model();
68 }
69 
70 void PlasmaTreeView::setStyleSheet(const QString &stylesheet)
71 {
72  widget()->setStyleSheet(stylesheet);
73 }
74 
75 QString PlasmaTreeView::styleSheet()
76 {
77  return widget()->styleSheet();
78 }
79 
80 Akonadi::EntityTreeView *PlasmaTreeView::nativeWidget() const
81 {
82  return static_cast<Akonadi::EntityTreeView*>(widget());
83 }
84 
85 }
86 
87 #include "plasmatreeview.moc"
88 
Akonadi::PlasmaTreeView::styleSheet
QString styleSheet()
Akonadi::PlasmaTreeView::nativeWidget
EntityTreeView * nativeWidget() const
Akonadi::PlasmaTreeView::setStyleSheet
void setStyleSheet(const QString &stylesheet)
Sets the stylesheet used to control the visual display of this TreeView.
Definition: plasmatreeview.cpp:70
Akonadi::PlasmaTreeView::PlasmaTreeView
PlasmaTreeView(QGraphicsWidget *parent=0)
Definition: plasmatreeview.cpp:40
Akonadi::PlasmaTreeView::~PlasmaTreeView
~PlasmaTreeView()
Definition: plasmatreeview.cpp:54
Akonadi::PlasmaTreeView::setModel
void setModel(QAbstractItemModel *model)
Sets a model for this weather view.
Definition: plasmatreeview.cpp:60
Akonadi::PlasmaTreeView::model
QAbstractItemModel * model()
QGraphicsProxyWidget
plasmatreeview.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kjots

Skip menu "kjots"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal