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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • dashboard
dashboard.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2008-2010 Daniel Laidig <d.laidig@gmx.de>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef DASHBOARD_H
15 #define DASHBOARD_H
16 
17 #include "ui_dashboard.h"
18 #include "statistics/statisticsmainwindow.h"
19 
20 #include <KXmlGuiWindow>
21 #include <QSignalMapper>
22 
23 static const int N = 50;
24 
25 class ParleyMainWindow;
26 class KUrl;
27 class QStandardItemModel;
28 
29 namespace Practice
30 {
31 class ThemedBackgroundRenderer;
32 class ImageWidget;
33 }
34 
35 
36 class CollectionWidget;
37 class RemoveButton;
38 
39 
40 class Dashboard : public KXmlGuiWindow
41 {
42  Q_OBJECT
43 public:
44  Dashboard(ParleyMainWindow *parent);
45  ~Dashboard();
46 
47 public slots:
48  void slotOpenUrl(const KUrl& url);
49  void slotPracticeUrl(const KUrl& url);
50  //void slotDoubleClicked(const QModelIndex& index);
51  void slotDoubleClickOpen();
52  //void updateRecentFilesModel();
53  void populateGrid();
54  void populateMap();
55  void clearGrid();
56  void slotPracticeButtonClicked(const QString& urlString);
57  void slotRemoveButtonClicked(const QString& urlString);
58  void statisticsHandler(KUrl url);
59  void remove(QGridLayout *layout, int row, int column, bool deleteWidgets);
60  void deleteChildWidgets(QLayoutItem *item);
61 
62 private slots:
63  void setTheme();
64  void updateWidgets();
65  void backgroundChanged(const QPixmap& pixmap);
66  void updateFontColors();
67  void updateBackground();
68 
69 private:
70  Ui::Dashboard *m_ui;
71  ParleyMainWindow *m_mainWindow;
72  StatisticsMainWindow *m_statisticsWidget;
73  Practice::ThemedBackgroundRenderer *m_themedBackgroundRenderer;
74  Practice::ImageWidget* m_widget;
75 
76  QMap<QString, QString> m_recentFilesMap; // url, name
77  KUrl m_openUrl;
78  QGridLayout *m_subGridLayout;
79  QGridLayout *m_completedGridLayout;
80  QList<CollectionWidget *> m_collectionWidgets; // List of the widgets in the dashboard.
81 
82  // The parts of the collections
83  //QLabel *m_nameLabel[N];
84  //QWidget *m_wordCloud[N];
85  //QPushButton *m_practiceButton[N];
86  //RemoveButton *m_removeButton[N];
87  KUrl m_urlArray[N];
88 
89  QSignalMapper *m_practiceSignalMapper; // For the practice buttons
90  QSignalMapper *m_removeSignalMapper; // For the remove buttons
91 
92  int m_count;
93 };
94 
95 #endif
Dashboard::~Dashboard
~Dashboard()
Definition: dashboard.cpp:141
statisticsmainwindow.h
QStandardItemModel
N
static const int N
Definition: dashboard.h:23
Dashboard::slotRemoveButtonClicked
void slotRemoveButtonClicked(const QString &urlString)
Definition: dashboard.cpp:325
Dashboard::slotDoubleClickOpen
void slotDoubleClickOpen()
Definition: dashboard.cpp:341
ParleyMainWindow
Definition: parleymainwindow.h:41
QMap< QString, QString >
Dashboard::slotPracticeButtonClicked
void slotPracticeButtonClicked(const QString &urlString)
Definition: dashboard.cpp:316
QGridLayout
Dashboard::clearGrid
void clearGrid()
Definition: dashboard.cpp:148
QLayoutItem
KXmlGuiWindow
StatisticsMainWindow
Definition: statisticsmainwindow.h:31
Dashboard::Dashboard
Dashboard(ParleyMainWindow *parent)
Definition: dashboard.cpp:59
QString
QList< CollectionWidget * >
QPixmap
Dashboard::statisticsHandler
void statisticsHandler(KUrl url)
Definition: dashboard.cpp:287
Dashboard
Definition: dashboard.h:40
Practice::ThemedBackgroundRenderer
Definition: themedbackgroundrenderer.h:31
Dashboard::slotPracticeUrl
void slotPracticeUrl(const KUrl &url)
Definition: dashboard.cpp:346
Dashboard::populateGrid
void populateGrid()
Definition: dashboard.cpp:206
Dashboard::deleteChildWidgets
void deleteChildWidgets(QLayoutItem *item)
Helper function.
Definition: dashboard.cpp:184
Practice::ImageWidget
Definition: imagewidget.h:24
CollectionWidget
Definition: collectionwidget.h:35
Dashboard::populateMap
void populateMap()
Definition: dashboard.cpp:195
QSignalMapper
Dashboard::slotOpenUrl
void slotOpenUrl(const KUrl &url)
Definition: dashboard.cpp:308
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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