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

kjots

  • sources
  • kde-4.14
  • 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 
23 #include <kiconloader.h>
24 
25 #include <akonadi/entitytreeview.h>
26 
27 // #include "private/style_p.h"
28 
29 namespace Akonadi
30 {
31 
32 class TreeViewPrivate
33 {
34 public:
35 // Plasma::Style::Ptr style;
36 };
37 
38 PlasmaTreeView::PlasmaTreeView(QGraphicsWidget *parent)
39  : QGraphicsProxyWidget(parent),
40  d(new TreeViewPrivate)
41 {
42  EntityTreeView *native = new EntityTreeView;
43  setWidget(native);
44  native->setAttribute(Qt::WA_NoSystemBackground);
45  native->setFrameStyle(QFrame::NoFrame);
46 
47 // d->style = Plasma::Style::sharedStyle();
48 // native->verticalScrollBar()->setStyle(d->style.data());
49 // native->horizontalScrollBar()->setStyle(d->style.data());
50 }
51 
52 PlasmaTreeView::~PlasmaTreeView()
53 {
54  delete d;
55 // Plasma::Style::doneWithSharedStyle();
56 }
57 
58 void PlasmaTreeView::setModel(QAbstractItemModel *model)
59 {
60  nativeWidget()->setModel(model);
61 }
62 
63 QAbstractItemModel *PlasmaTreeView::model()
64 {
65  return nativeWidget()->model();
66 }
67 
68 void PlasmaTreeView::setStyleSheet(const QString &stylesheet)
69 {
70  widget()->setStyleSheet(stylesheet);
71 }
72 
73 QString PlasmaTreeView::styleSheet()
74 {
75  return widget()->styleSheet();
76 }
77 
78 Akonadi::EntityTreeView *PlasmaTreeView::nativeWidget() const
79 {
80  return static_cast<Akonadi::EntityTreeView*>(widget());
81 }
82 
83 }
84 
85 
QWidget::setStyleSheet
void setStyleSheet(const QString &styleSheet)
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:68
Akonadi::PlasmaTreeView::PlasmaTreeView
PlasmaTreeView(QGraphicsWidget *parent=0)
Definition: plasmatreeview.cpp:38
QGraphicsProxyWidget
Akonadi::PlasmaTreeView::~PlasmaTreeView
~PlasmaTreeView()
Definition: plasmatreeview.cpp:52
Akonadi::PlasmaTreeView::setModel
void setModel(QAbstractItemModel *model)
Sets a model for this weather view.
Definition: plasmatreeview.cpp:58
QGraphicsWidget
Akonadi::PlasmaTreeView::model
QAbstractItemModel * model()
QString
QAbstractItemModel
QGraphicsProxyWidget::widget
QWidget * widget() const
QGraphicsProxyWidget::setWidget
void setWidget(QWidget *widget)
plasmatreeview.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:12 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
  • pimprint

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