Second pass at moving joystick settings into general settings dialog window

Hopefully this one's a little cleaner. Only thing I could see people complaining about is me changing "joystick" to "controller" in the UI, but I think that makes more sense. I use this interface and only use gamepads, not joysticks, so controllers should be a more general and better term anyways.
Not on the stack, but I don’t see what is wrong with making them a member of another object. I may not have done that with QWidget specifically, but certainly with other QObject based stuff lots of times. You just pass NULL as parent.

Having spent too much of my life on performance issues in software I tend to stay way from “new" as much as possible. Like I said it’s fine. Just something that rubs me the wrong way. Like you said though, Qt allocates tiny little objects like a drunken sailor so this one isn’t going to make a difference!

On Aug 27, 2014, at 9:23 PM, Susurrus <notifications@github.com> wrote:

> In src/ui/QGCSettingsWidget.cc:
> 
> > @@ -24,6 +23,9 @@ QGCSettingsWidget::QGCSettingsWidget(QWidget *parent, Qt::WindowFlags flags) :
> >      position.moveCenter(QApplication::desktop()->availableGeometry().center());
> >      move(position.topLeft());
> >  
> > +    // Add the joystick settings pane
> > +    ui->tabWidget->addTab(new JoystickWidget(joystick, this), "Controllers");
> > +
> Qt puts everything on the heap due to its D-pointer architecture (see https://stackoverflow.com/questions/18984925/c-why-do-i-create-these-widgets-on-the-heap), so this doesn't really save us that much. It'd also be inconsistent with the way most of the code in QGC is written. Qt was really designed for everything to be on the heap. While I don't like it either, I see this more of a quirk in Qt than a defect with the particular way I've programmed this.
> 
> Having said that, do you ever put QWidgets on the stack? I don't think I've seen anywhere in QGC where that's been done.
> 
> —
> Reply to this email directly or view it on GitHub.
>