title: enum values in a class - Qt Creator
body: <p>I made a functions class that contains enumerated values but when called in my main.cpp, I get a "has not been declared" error. I'm trying to figure out where I'm going wrong but not having much luck. My class header, currently (reduced to fit here):</p>
  
  <pre><code>class main_funcs : public QObject
  {
      Q_OBJECT
  public:
  main_funcs(QObject *parent, QQuickView *view)
      : QObject(parent), myDialog(view){
  
      IP_is_set = false;
      newIP = null;
      newIP.resize(50);
      local_IPv4 = null;
  
      enum direction {up, down};
      enum sys_sides {left, right};
      enum sys_control {analog, digital};
  public slots:
      void myfunc1();
      void myfunc2(sys_sides side);
      void myfunc3(direction dir);
      void myfunc4(sys_control type);
  private:
      ...
      ...
  }
  </code></pre>
  
  <p>and in my main.cpp, I'm connecting signals to slots:</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      QGuiApplication app(argc, argv);
  
      // MAIN CONTROL WINDOW:
      QQuickView* view = new QQuickView(QUrl("main.qml")); 
      view-&gt;show();
      QQuickItem *rect = view-&gt;rootObject();
      main_funcs *funcs = new main_funcs(0, view);
  
      QObject::connect(rect, SIGNAL(onClicked_func1()), funcs, SLOT(myfunc1()));
      QObject::connect(rect, SIGNAL(onClicked_func2()), funcs, SLOT(myfunc2(funcs::up)));
      QObject::connect(rect, SIGNAL(onClicked_func3()), funcs, SLOT(myfunc3(funcs::left)));
      QObject::connect(rect, SIGNAL(onClicked_func4()), funcs, SLOT(myfunc4(funcs::analog)));
  </code></pre>
  
  <p>The error appears in the class header at the functions that require enumerated values. The error is that the enumerated value "has not been declared"  -It's declared in the public heading just above it. I'm still a C/C++ newb, and definitely new to Qt as I haven't done much with it. Can anyone point me in the right direction at the very least? Thanks!</p>