|
Canorus
0.0
|
Advanced Document, Sheet, Staff etc. properties. More...
#include <propertiesdialog.h>

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 () |
| CADocument * | document () |
| 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 |
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.
| CAPropertiesDialog::CAPropertiesDialog | ( | CADocument * | doc, |
| QWidget * | parent = 0 |
||
| ) |
|
virtual |
|
private |
Called when "Apply" button is clicked.
References _contextPropertiesWidget, _document, _documentPropertiesWidget, _voicePropertiesWidget, buildTree(), CAContext::contextType(), createDocumentFromTree(), CAUndo::createUndoCommand(), CAContext::FiguredBassContext, CAContext::FunctionMarkContext, CAContext::LyricsContext, CAUndo::pushUndoCommand(), CACanorus::rebuildUI(), CADocument::setArranger(), CADocument::setComments(), CADocument::setComposer(), CADocument::setCopyright(), CADocument::setDedication(), CAVoice::setMidiChannel(), CAVoice::setMidiPitchOffset(), CAStaff::setNumberOfLines(), CADocument::setPoet(), CADocument::setSubtitle(), CADocument::setTextTranslator(), CADocument::setTitle(), CAContext::Staff, and CACanorus::undo().
Referenced by on_uiButtonBox_clicked().


|
private |
Fills the content of the document tree on the left. Tree always shows the whole Document structure.
References _contextItem, _contextPropertiesWidget, _document, _documentItem, _documentPropertiesWidget, _sheetItem, _sheetPropertiesWidget, _voiceItem, _voicePropertiesWidget, contextItem(), sheetItem(), CADocument::sheetList(), updateDocumentProperties(), updateFunctionMarkContextProperties(), updateLyricsContextProperties(), updateSheetProperties(), updateStaffProperties(), updateVoiceProperties(), voiceItem(), and CAStaff::voiceList().
Referenced by applyProperties(), and CAPropertiesDialog().


|
inline |
References _contextItem.
Referenced by buildTree(), and contextProperties().

|
static |
References contextItem(), CASheet::document(), and CAContext::sheet().
Referenced by CAMainWin::on_uiContextProperties_triggered().


|
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().


|
inline |
References _document.
|
inline |
References _documentItem.
Referenced by documentProperties().

|
static |
References documentItem().
Referenced by CAMainWin::on_uiDocumentProperties_triggered().


|
slot |
|
slot |
References _contextItem, _document, _documentItem, _sheetItem, _voiceItem, CAContext::FiguredBassContext, CAContext::FunctionMarkContext, CAContext::LyricsContext, CAContext::Staff, updateDocumentProperties(), updateFunctionMarkContextProperties(), updateLyricsContextProperties(), updateSheetProperties(), updateStaffProperties(), and updateVoiceProperties().

|
slot |
|
slot |
|
inline |
References _sheetItem.
Referenced by buildTree(), and sheetProperties().

|
static |
References CASheet::document(), and sheetItem().
Referenced by CAMainWin::on_uiSheetProperties_triggered().


|
private |
References _documentPropertiesWidget, CADocument::arranger(), CADocument::comments(), CADocument::composer(), CADocument::copyright(), CADocument::dedication(), CADocumentProperties::on_uiComposer_editingFinished(), CADocument::poet(), CADocument::subtitle(), CADocument::textTranslator(), and CADocument::title().
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().


|
private |
References _contextPropertiesWidget.
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

|
private |
References _contextPropertiesWidget.
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

|
private |
References _sheetPropertiesWidget.
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().

|
private |
References _contextPropertiesWidget, and CAStaff::numberOfLines().
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().


|
private |
References _voicePropertiesWidget, CAVoice::midiChannel(), and CAVoice::midiPitchOffset().
Referenced by buildTree(), and on_uiDocumentTree_currentItemChanged().


|
inline |
References _voiceItem.
Referenced by buildTree(), and voiceProperties().

|
static |
References CASheet::document(), CAContext::sheet(), CAVoice::staff(), and voiceItem().
Referenced by CAMainWin::on_uiVoiceProperties_triggered().


|
private |
Referenced by buildTree(), contextItem(), createDocumentFromTree(), and on_uiDocumentTree_currentItemChanged().
|
private |
|
private |
|
private |
Referenced by buildTree(), documentItem(), and on_uiDocumentTree_currentItemChanged().
|
private |
Referenced by applyProperties(), buildTree(), and updateDocumentProperties().
|
private |
Referenced by buildTree(), createDocumentFromTree(), on_uiDocumentTree_currentItemChanged(), and sheetItem().
|
private |
Referenced by buildTree(), and updateSheetProperties().
|
private |
Referenced by buildTree(), createDocumentFromTree(), on_uiDocumentTree_currentItemChanged(), and voiceItem().
|
private |
Referenced by applyProperties(), buildTree(), and updateVoiceProperties().