QtEditor Class Reference

[kooBase Index] [kooBase Hierarchy] [Headers]


Qt Editor More...

#include <qtEditor.h>

Inherits: KTopLevelWidget, IfEditor

Public Members

Public Slots

Protected Members


Detailed Description

This class contains the basic functionality of a qt editor. Concrete editors like ScoreEditor, DrumEditor and PianoRollEditor are derived from this.


QtEditor(char * name, KbPart * kbpart, char * author, bool all=false) [public]

Constructor. Call this constructor from your editorīs constructor with the following arguments:

Parameters:
all if this is true, the variable partList is filled with all parts (but the muted), (the score editor makes use of this)
name the name of your editor, which just appears in the window titlebar of your editor.
author your name: It appears in the editorīs about box of the optionmenu ;-)
kbpart the part that shall be displayed in your editor (you usually have this as a parameter for your constructor)

void init() [public]

Initialization of the fundamental editor attributes. Call this from your constructor as well.

int gLenValue() [public]

returns the current editor setting of the length value. (You have to provide a way to change this value yourself. E.g. in the score-editor I provide a buttonbar the user can select the length value from, the default value is 4). You can use any types of values, even midi-ticks. The score-editor uses different codings: A length value of 1 represents 1536 midi-ticks (a whole note), a length value of 2 represents 768 midi-ticks (a half note), 3 is 384 midi-ticks (a quarter), 4 is 192 midi-ticks (an eigth note), 5 is 96 midi-ticks (a sixteenth note), etc. There are additional methods for triplets and dotted notes (see below).

See Also:
sLenValue, gDotValue, sDotValue, gTriValue, sTriValue

void sLenValue(int l) [public]

sets the length value

See Also:
gLenValue, gDotValue, sDotValue, gTriValue, sTriValue

bool gDotValue() [public]

returns the dot value.

See Also:
gLenValue, sLenValue, sDotValue, gTriValue, sTriValue

void sDotValue(bool d) [public]

sets the dot value

See Also:
gLenValue, sLenValue, gDotValue, gTriValue, sTriValue

bool gTriValue() [public]

returns the triplet value

See Also:
gLenValue, sLenValue, gDotValue, sDotValue, sTriValue

void sTriValue(bool t) [public]

sets the triplet value

See Also:
gLenValue, sLenValue, gDotValue, gTriValue, gTriValue

void addOptions() [public virtual]

override this method to add extra functionality to the options menu of your editor

void settings() [public virtual]

override this method. It is called when the user selects the "settings" entry of the "System" menu. (E.g. the score editorcalls the key-clef-and-meter chooser).

KbNote * selectedNote() [public]

If a note is selected, this returns the notes address

void selectNote(KbNote * n) [public]

sets the selected Note

KbPart * gPart() [public]

returns the part under consideration

void paintEvent( QPaintEvent * ) [public slot virtual]

override this method to get your own presentation of the part.

void fileMenu(int) [public slot]

This is called when an entry of the file menu is selected.

void systemMenu(int) [public slot]

This is called when an entry of the system menu is selected.

void selectionMenu(int) [public slot]

This is called when an entry of the selection menu is selected.

void optionsMenu(int) [public slot virtual]

Override this method if you have declared any entries for the options menu. This is called when an entry of the options menu is selected.

void snapMenu(int) [public slot]

This is called when an entry of the snap menu is selected.

void velocMenu(int) [public slot]

This is called when an entry of the velocity menu is selected.

void panelMenu(int) [public slot]

This is called when an button of the panel is pressed.

void setIns() [public slot]

This is called when a new position is entered in the "insert" text field.

void mousePressEvent( QMouseEvent * ) [public slot virtual]

override this method to let your editor react on mouse press events

void mouseMoveEvent( QMouseEvent * ) [public slot virtual]

override this method to let your editor react on mouse move events

void mouseReleaseEvent( QMouseEvent * ) [public slot virtual]

override this method to let your editor react on mouse release events

void keyPressEvent( QKeyEvent * ) [public slot virtual]

override this method to let your editor react on key press events

void keyReleaseEvent( QKeyEvent * ) [public slot virtual]

override this method to let your editor react on key release events


  • Author: Jan Wuerthner
  • Version: 0.95
  • Documentation generated by wuerthne@clouseau on Sat Feb 20 16:41:13 MST 1999
Kdoc