Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 ( CADocument doc,
QWidget parent = 0 
)

References _document, buildTree(), Ui_uiPropertiesDialog::setupUi(), and Ui_uiPropertiesDialog::uiDocumentTree.

Here is the call graph for this function:

CAPropertiesDialog::~CAPropertiesDialog ( )
virtual

Member Function Documentation

void CAPropertiesDialog::applyProperties ( )
private
void CAPropertiesDialog::buildTree ( )
private
QHash< QTreeWidgetItem*, CAContext* >& CAPropertiesDialog::contextItem ( )
inline

References _contextItem.

Referenced by buildTree().

Here is the caller graph for this function:

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

References CASheet::document(), CAContext::sheet(), and Ui_uiPropertiesDialog::uiDocumentTree.

Referenced by CAMainWin::on_uiContextProperties_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

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::contextAt(), CASheet::contextCount(), CAContext::contextType(), CASheet::removeContext(), CADocument::removeSheet(), CAStaff::removeVoice(), CADocument::sheetAt(), CADocument::sheetCount(), CAContext::Staff, Ui_uiPropertiesDialog::uiDocumentTree, CAStaff::voiceAt(), and CAStaff::voiceCount().

Referenced by applyProperties().

Here is the call graph for this function:

Here is the caller graph for this function:

CADocument* CAPropertiesDialog::document ( )
inline

References _document.

QTreeWidgetItem* CAPropertiesDialog::documentItem ( )
inline

References _documentItem.

Referenced by documentProperties().

Here is the caller graph for this function:

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

References documentItem(), and Ui_uiPropertiesDialog::uiDocumentTree.

Referenced by CAMainWin::on_uiDocumentProperties_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAPropertiesDialog::on_uiButtonBox_clicked ( QAbstractButton *  button)
slot

References applyProperties(), and Ui_uiPropertiesDialog::uiButtonBox.

Here is the call graph for this function:

void CAPropertiesDialog::on_uiDocumentTree_currentItemChanged ( QTreeWidgetItem *  cur,
QTreeWidgetItem *  prev 
)
slot
void CAPropertiesDialog::on_uiDown_clicked ( bool  down)
slot
void CAPropertiesDialog::on_uiUp_clicked ( bool  down)
slot
QHash< QTreeWidgetItem*, CASheet* >& CAPropertiesDialog::sheetItem ( )
inline

References _sheetItem.

Referenced by buildTree().

Here is the caller graph for this function:

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

References CASheet::document(), and Ui_uiPropertiesDialog::uiDocumentTree.

Referenced by CAMainWin::on_uiSheetProperties_triggered().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAPropertiesDialog::updateDocumentProperties ( CADocument doc)
private
void CAPropertiesDialog::updateFunctionMarkContextProperties ( CAFunctionMarkContext fmc)
private

References _contextPropertiesWidget, and Ui_uiPropertiesDialog::uiPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

void CAPropertiesDialog::updateLyricsContextProperties ( CALyricsContext lc)
private

References _contextPropertiesWidget, and Ui_uiPropertiesDialog::uiPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

void CAPropertiesDialog::updateSheetProperties ( CASheet sheet)
private

References _sheetPropertiesWidget, and Ui_uiPropertiesDialog::uiPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the caller graph for this function:

void CAPropertiesDialog::updateStaffProperties ( CAStaff staff)
private

References _contextPropertiesWidget, CAStaff::numberOfLines(), Ui_uiStaffProperties::uiNumberOfLines, and Ui_uiPropertiesDialog::uiPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAPropertiesDialog::updateVoiceProperties ( CAVoice voice)
private

References _voicePropertiesWidget, CAVoice::midiChannel(), and Ui_uiPropertiesDialog::uiPropertiesWidget.

Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References _voiceItem.

Referenced by buildTree().

Here is the caller graph for this function:

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

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

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

QHash< QTreeWidgetItem*, CAContext* > CAPropertiesDialog::_contextItem
private
QHash< CAContext*, QWidget* > CAPropertiesDialog::_contextPropertiesWidget
private
CADocument* CAPropertiesDialog::_document
private
QTreeWidgetItem* CAPropertiesDialog::_documentItem
private
QWidget* CAPropertiesDialog::_documentPropertiesWidget
private
QHash< QTreeWidgetItem*, CASheet* > CAPropertiesDialog::_sheetItem
private
QHash< CASheet*, QWidget* > CAPropertiesDialog::_sheetPropertiesWidget
private
QHash< QTreeWidgetItem*, CAVoice* > CAPropertiesDialog::_voiceItem
private
QHash< CAVoice*, QWidget* > CAPropertiesDialog::_voicePropertiesWidget
private

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