Canorus 0.0
Public Slots | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CAPropertiesDialog Class Reference

Advanced Document, Sheet, Staff etc. properties. More...

#include <propertiesdialog.h>

Inheritance diagram for CAPropertiesDialog:
Inheritance graph
[legend]

Public Slots

void on_uiDocumentTree_currentItemChanged (QTreeWidgetItem *cur, QTreeWidgetItem *prev)
 
void on_uiButtonBox_clicked (QAbstractButton *)
 
void on_uiUp_clicked (bool)
 
void on_uiDown_clicked (bool)
 

Public Member Functions

 CAPropertiesDialog (CADocument *doc, QWidget *parent=0)
 
virtual ~CAPropertiesDialog ()
 
CADocumentdocument ()
 
QTreeWidgetItem * documentItem ()
 
QHash< QTreeWidgetItem *, CASheet * > & sheetItem ()
 
QHash< QTreeWidgetItem *, CAContext * > & contextItem ()
 
QHash< QTreeWidgetItem *, CAVoice * > & voiceItem ()
 

Static Public Member Functions

static void documentProperties (CADocument *doc, QWidget *parent)
 
static void sheetProperties (CASheet *sheet, QWidget *parent)
 
static void contextProperties (CAContext *context, QWidget *parent)
 
static void voiceProperties (CAVoice *voice, QWidget *parent)
 

Private Member Functions

void buildTree ()
 
void applyProperties ()
 
void createDocumentFromTree ()
 
void updateDocumentProperties (CADocument *)
 
void updateSheetProperties (CASheet *)
 
void updateStaffProperties (CAStaff *)
 
void updateVoiceProperties (CAVoice *)
 
void updateLyricsContextProperties (CALyricsContext *)
 
void updateFunctionMarkContextProperties (CAFunctionMarkContext *)
 

Private Attributes

CADocument_document
 
QTreeWidgetItem * _documentItem
 
QWidget * _documentPropertiesWidget
 
QHash< CASheet *, QWidget * > _sheetPropertiesWidget
 
QHash< QTreeWidgetItem *, CASheet * > _sheetItem
 
QHash< CAContext *, QWidget * > _contextPropertiesWidget
 
QHash< QTreeWidgetItem *, CAContext * > _contextItem
 
QHash< CAVoice *, QWidget * > _voicePropertiesWidget
 
QHash< QTreeWidgetItem *, CAVoice * > _voiceItem
 

Detailed Description

Advanced Document, Sheet, Staff etc. properties.

Copyright (c) 2007, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.

Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.

This dialog offers changing all the settings for Canorus objects. It is similar to CASettingsDialog. On the left it shows you a tree widget view of the current document and allows you to select one of the objects and sub-objects. On the right, the object properties are shown. Changes are managed using Ok, Apply and Cancel buttons.

To use this dialog, call one of the static methods documentProperties(), sheetProperties(), contextProperties() or voiceProperties() and pass the current document, sheet, context or voice. Methods will generate and show the dialog and delete it in the end.

Actual objects properties widgets (properties widget for document, sheet etc.) are stored inside *.ui files.

Constructor & Destructor Documentation

◆ CAPropertiesDialog()

CAPropertiesDialog::CAPropertiesDialog ( CADocument doc,
QWidget *  parent = 0 
)

References _document, and buildTree().

Here is the call graph for this function:

◆ ~CAPropertiesDialog()

CAPropertiesDialog::~CAPropertiesDialog ( )
virtual

Member Function Documentation

◆ applyProperties()

void CAPropertiesDialog::applyProperties ( )
private

◆ buildTree()

void CAPropertiesDialog::buildTree ( )
private

◆ contextItem()

QHash< QTreeWidgetItem *, CAContext * > & CAPropertiesDialog::contextItem ( )
inline

References _contextItem.

Referenced by buildTree(), and contextProperties().

Here is the caller graph for this function:

◆ contextProperties()

void CAPropertiesDialog::contextProperties ( CAContext context,
QWidget *  parent 
)
static

References contextItem(), CASheet::document(), and CAContext::sheet().

Referenced by CAMainWin::on_uiContextProperties_triggered().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createDocumentFromTree()

void CAPropertiesDialog::createDocumentFromTree ( )
private

Repositiones document structure as placed in the document tree widget. This is used when a user changes the order of document elements and the elements need to be readded to its parent structures. This method is usually called when applying the changes.

References _contextItem, _document, _sheetItem, _voiceItem, CASheet::addContext(), CADocument::addSheet(), CAStaff::addVoice(), CASheet::contextList(), CAContext::contextType(), CASheet::removeContext(), CADocument::removeSheet(), CAStaff::removeVoice(), CADocument::sheetList(), CAContext::Staff, and CAStaff::voiceList().

Referenced by applyProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ document()

CADocument * CAPropertiesDialog::document ( )
inline

References _document.

◆ documentItem()

QTreeWidgetItem * CAPropertiesDialog::documentItem ( )
inline

References _documentItem.

Referenced by documentProperties().

Here is the caller graph for this function:

◆ documentProperties()

void CAPropertiesDialog::documentProperties ( CADocument doc,
QWidget *  parent 
)
static

References documentItem().

Referenced by CAMainWin::on_uiDocumentProperties_triggered().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_uiButtonBox_clicked

void CAPropertiesDialog::on_uiButtonBox_clicked ( QAbstractButton *  button)
slot

References applyProperties().

Here is the call graph for this function:

◆ on_uiDocumentTree_currentItemChanged

void CAPropertiesDialog::on_uiDocumentTree_currentItemChanged ( QTreeWidgetItem *  cur,
QTreeWidgetItem *  prev 
)
slot

◆ on_uiDown_clicked

void CAPropertiesDialog::on_uiDown_clicked ( bool  down)
slot

◆ on_uiUp_clicked

void CAPropertiesDialog::on_uiUp_clicked ( bool  down)
slot

◆ sheetItem()

QHash< QTreeWidgetItem *, CASheet * > & CAPropertiesDialog::sheetItem ( )
inline

References _sheetItem.

Referenced by buildTree(), and sheetProperties().

Here is the caller graph for this function:

◆ sheetProperties()

void CAPropertiesDialog::sheetProperties ( CASheet sheet,
QWidget *  parent 
)
static

References CASheet::document(), and sheetItem().

Referenced by CAMainWin::on_uiSheetProperties_triggered().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDocumentProperties()

void CAPropertiesDialog::updateDocumentProperties ( CADocument doc)
private

◆ updateFunctionMarkContextProperties()

void CAPropertiesDialog::updateFunctionMarkContextProperties ( CAFunctionMarkContext fmc)
private

References _contextPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

◆ updateLyricsContextProperties()

void CAPropertiesDialog::updateLyricsContextProperties ( CALyricsContext lc)
private

References _contextPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

◆ updateSheetProperties()

void CAPropertiesDialog::updateSheetProperties ( CASheet sheet)
private

References _sheetPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

◆ updateStaffProperties()

void CAPropertiesDialog::updateStaffProperties ( CAStaff staff)
private

References _contextPropertiesWidget, and CAStaff::numberOfLines().

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateVoiceProperties()

void CAPropertiesDialog::updateVoiceProperties ( CAVoice voice)
private

References _voicePropertiesWidget, CAVoice::midiChannel(), and CAVoice::midiPitchOffset().

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ voiceItem()

QHash< QTreeWidgetItem *, CAVoice * > & CAPropertiesDialog::voiceItem ( )
inline

References _voiceItem.

Referenced by buildTree(), and voiceProperties().

Here is the caller graph for this function:

◆ voiceProperties()

void CAPropertiesDialog::voiceProperties ( CAVoice voice,
QWidget *  parent 
)
static

References CASheet::document(), CAContext::sheet(), CAVoice::staff(), and voiceItem().

Referenced by CAMainWin::on_uiVoiceProperties_triggered().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _contextItem

QHash< QTreeWidgetItem*, CAContext* > CAPropertiesDialog::_contextItem
private

◆ _contextPropertiesWidget

QHash< CAContext*, QWidget* > CAPropertiesDialog::_contextPropertiesWidget
private

◆ _document

CADocument* CAPropertiesDialog::_document
private

◆ _documentItem

QTreeWidgetItem* CAPropertiesDialog::_documentItem
private

◆ _documentPropertiesWidget

QWidget* CAPropertiesDialog::_documentPropertiesWidget
private

◆ _sheetItem

QHash< QTreeWidgetItem*, CASheet* > CAPropertiesDialog::_sheetItem
private

◆ _sheetPropertiesWidget

QHash< CASheet*, QWidget* > CAPropertiesDialog::_sheetPropertiesWidget
private

Referenced by buildTree(), and updateSheetProperties().

◆ _voiceItem

QHash< QTreeWidgetItem*, CAVoice* > CAPropertiesDialog::_voiceItem
private

◆ _voicePropertiesWidget

QHash< CAVoice*, QWidget* > CAPropertiesDialog::_voicePropertiesWidget
private

The documentation for this class was generated from the following files: