From: Seb J. <se...@hy...> - 2004-04-04 12:03:47
|
Hello, Here's a snippet of code from notationviewslot.cpp (from line 1316 in cvs file version 1.113): ------------------------------------------------------- void NotationView::slotEditAddKeySignature() { NotationStaff *staff = m_staffs[m_currentStaff]; Segment &segment = staff->getSegment(); Rosegarden::Clef clef; Rosegarden::Key key; timeT insertionTime = getInsertionTime(clef, key); //!!! experimental: Rosegarden::CompositionTimeSliceAdapter adapter (&getDocument()->getComposition(), insertionTime, getDocument()->getComposition().getDuration()); Rosegarden::AnalysisHelper helper; key = helper.guessKey(adapter); KeySignatureDialog *dialog = new KeySignatureDialog (this, m_notePixmapFactory, clef, key, true, true, i18n("Estimated key signature shown")); ---------------------------------------------------------- My question relates to m_notePixmapFactory. This appears to be a member variable for the KeySignatureDialog class. If I put a similar member variable in my CombinedSignatureDialog class, I get an error. I've put the corresponding code for my dialog in rosegardengui.cpp and it looks like this: ------------------------------------------------------- void RosegardenGUIApp::slotEditCombinedSignature(QWidget *parent) { // Gets the address of the composition that we're talking about. // We will need this. Rosegarden::Composition &composition(m_doc->getComposition()); // Finds the current time position in the composition // We won't need this; we'll set it to 0. Rosegarden::timeT time = composition.getPosition(); // Find the time signature at the current time. Rosegarden::TimeSignature sig = composition.getTimeSignatureAt(time); // This just hoicked out of notationviewslots.cpp: Rosegarden::Clef clef; Rosegarden::Key key; // Insertion time will always be 0 in this dialog. timeT insertionTime = 0; // Create a CombinedSignatureDialog (class to be found in dialog.[h|cpp]) CombinedSignatureDialog *dialog = new CombinedSignatureDialog (parent, &composition, m_notePixmapFactory, clef, time, sig, false, key, true, true, i18n("Estimated key signature shown"); ------------------------------------------------------- This code generates an error that m_notePixmapFactory hasn't been declared, but I have certainly included it as a member function in my CombinedSignatureDialog class. Any idea what's up here? Seb |