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

parley

KVTLessonView Class Reference

#include <kvtlessonview.h>

Inheritance diagram for KVTLessonView:

Inheritance graph
[legend]

List of all members.


Detailed Description

View for the lesson list.

Actually a QTreeView because QListView cannot have checkboxes.

Author:
Frederik Gladhorn <frederik.gladhorn@kdemail.net>

Definition at line 34 of file kvtlessonview.h.


Public Slots

void slotModelReset ()
void slotCreateNewLesson ()
void slotRenameLesson ()
void slotDeleteLesson ()
void slotSelectLesson (int lesson)
void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
void slotCheckAllLessons ()
void slotCheckNoLessons ()
void slotSplitLesson ()

Signals

void signalCurrentLessonChanged (int currentIndex)
void lessonsInQueryChanged ()

Public Member Functions

 KVTLessonView (QWidget *parent=0)
void setModel (KVTLessonModel *model)
void initializeSelection ()

Constructor & Destructor Documentation

KVTLessonView::KVTLessonView ( QWidget *  parent = 0  ) 

Set up the lesson list widget.

Also creates the menu to manipulate the lessons.

Parameters:
parent parent widget

Definition at line 40 of file kvtlessonview.cpp.


Member Function Documentation

void KVTLessonView::setModel ( KVTLessonModel *  model  ) 

Set the model for the view.

Parameters:
model the model

Definition at line 53 of file kvtlessonview.cpp.

void KVTLessonView::initializeSelection (  ) 

Select the current lesson from the document.

Definition at line 64 of file kvtlessonview.cpp.

void KVTLessonView::slotModelReset (  )  [slot]

Append an action to the right click menu.

Parameters:
appendAction The model was reset, we need to update the selection using initializeSelection.

Definition at line 59 of file kvtlessonview.cpp.

void KVTLessonView::slotCreateNewLesson (  )  [slot]

Append a lesson to the model and automatically set an edit up so the user can change "New lesson" into something meaningfull.

Definition at line 79 of file kvtlessonview.cpp.

void KVTLessonView::slotRenameLesson (  )  [slot]

Create an editor to let the user type a new name for the lesson.

Definition at line 88 of file kvtlessonview.cpp.

void KVTLessonView::slotDeleteLesson (  )  [slot]

Remove a lesson.

Ask if it's not empty.

Todo:
maybe a better message here...

Definition at line 94 of file kvtlessonview.cpp.

void KVTLessonView::slotSelectLesson ( int  lesson  )  [slot]

Set the selection to a lesson.

Parameters:
lesson the index of the new selection.

Definition at line 113 of file kvtlessonview.cpp.

void KVTLessonView::selectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
) [slot]

Slot from model/view - a new item has been selected.

We only extract the newly selected lesson and call slotSelectLesson.

Parameters:
selected is the new selection
deselected was selected before

Reimplemented from QTreeView.

Definition at line 106 of file kvtlessonview.cpp.

void KVTLessonView::slotCheckAllLessons (  )  [slot]

Add all lessons to query.

Activated from menu, passes to m_model.

Definition at line 69 of file kvtlessonview.cpp.

void KVTLessonView::slotCheckNoLessons (  )  [slot]

Remove all lessons from query.

Activated from menu, passes to m_model.

Definition at line 74 of file kvtlessonview.cpp.

void KVTLessonView::slotSplitLesson (  )  [slot]

Creates many small lessons with the contents of the original lesson.

Todo:
Let the user select if entries are taken by random or order.

Todo:
A nicer dialog would be great. Maybe with radio buttons to ask, if the entries should be in random order or as they come.

Definition at line 127 of file kvtlessonview.cpp.

void KVTLessonView::signalCurrentLessonChanged ( int  currentIndex  )  [signal]

Emitted when a new lesson is selected.

Indicates the selected lesson.

void KVTLessonView::lessonsInQueryChanged (  )  [signal]

Emitted when any of the checkboxes for the query change.


The documentation for this class was generated from the following files:
  • kvtlessonview.h
  • kvtlessonview.cpp

parley

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

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
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