On 09/03/2014 08:34 PM, Ian Sannar wrote: > Well. Updated the .h as much as I could with my limited C++ knowledge. > Vesa (or somebody else who knows what they're doing) could you check > this out for me? > https://github.com/cubician/Karnex/blob/master/Karnex.h > Thanks.
//What does this do? It's a macro from Qt. It enables the use of signals & slots. //I'm assuming only the skeleton is defined in the .h? If your method is empty, like the destructor usually is, you can usually also implement it in the header. But there's no harm in only having the definition of everything in the header, and leaving the implementation for the .cpp. //Is this just for BitInvader or is it something I would need to include for Karnex? Anything that isn't virtual, is not required. Inherited, overridden methods are always virtual in C++. //Semicolons are required to terminate class definitions in C++? Yes. Note also that for each knob (and other GUI element), you'll need a corresponding Model in the Instrument class. So eg. for knob * m_fmGainKnob you should have FloatModel m_fmGain (or m_fmGainModel if you want to be fancy). In the InstrumentView class, you can remove those GUI elements from BitInvader if you don't need them. Also if you want to use buttons for a waveform selector, you shouldn't use signals & slots for them - you can just use an AutomatableButtonGroup - see other instruments that have waveform selectors to see how that is done, eg. TripleOsc. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ LMMS-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lmms-devel
