skin: modified variable names 83/29083/2
authorGiWoong Kim <giwoong.kim@samsung.com>
Thu, 25 Sep 2014 07:00:34 +0000 (16:00 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 22 Oct 2014 04:49:15 +0000 (21:49 -0700)
To distinguish between main window concept and
controller window concept, we need to redefine
variable or function names from source code.
- device-shaped window -> main window
- key window -> controller window

Change-Id: I8b3adcdf2d72c9d897510838fe1d6d2db61dd8ab
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
14 files changed:
tizen/src/display/qt5_supplement.cpp
tizen/src/ui/Makefile.objs
tizen/src/ui/displaybase.cpp
tizen/src/ui/mainform.cpp [new file with mode: 0644]
tizen/src/ui/mainform.h [new file with mode: 0644]
tizen/src/ui/mainwindow.cpp
tizen/src/ui/menu/contextmenu.cpp
tizen/src/ui/skinform.cpp [deleted file]
tizen/src/ui/skinform.h [deleted file]
tizen/src/ui/skinview.cpp
tizen/src/ui/uiinformation.cpp
tizen/src/ui/uiinformation.h
tizen/src/ui/uistate.cpp
tizen/src/ui/uistate.h

index 1e45b5dfa389f9bb6a3ac04140e035e666a171ee..8594d0812f8bd0aff9317cbf50fd4beed039617e 100644 (file)
@@ -46,8 +46,8 @@ extern "C" {
 
 //using namespace std;
 void qMessageOutput(QtMsgType, const QMessageLogContext &, const QString &);
-void loadSkinFormFromXML(QFile *, UIInformation *);
-void loadControllerFormFromXML(QFile *, UIInformation *);
+void loadMainFormFromXML(QFile *, UIInformation *);
+void loadConFormFromXML(QFile *, UIInformation *);
 int getControlIndex();
 int getPriority(QFile *file);
 
@@ -91,7 +91,7 @@ void qt5_skin_init(void)
     }
     uiInfo->skinName = skinName;
 
-    uiInfo->uiState.formScale = 50;
+    uiInfo->uiState.mainFormScale = 50;
 
     /* XML */
     // TODO: convert QML to XML
@@ -101,16 +101,16 @@ void qt5_skin_init(void)
     qmlRegisterType<HardwareKeyType>("EmulatorComponent", 1, 0, "Key");
     qmlRegisterType<KeyListType>("EmulatorComponent", 1, 0, "KeyList");
 
-    /* load skin form */
-    QFile skinXMLFile(uiInfo->skinPath + FORM_FILE_NAME);
-    loadSkinFormFromXML(&skinXMLFile, uiInfo);
+    /* load main form */
+    QFile mainXMLFile(uiInfo->skinPath + FORM_FILE_NAME);
+    loadMainFormFromXML(&mainXMLFile, uiInfo);
 
     /* load controller forms */
     QDir skinDir(uiInfo->skinPath + CON_FORM_SUBPATH);
     QFileInfoList entries = skinDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
     for (int i = 0; i < entries.size(); i++) {
         QFile conXMLFile(entries.at(i).filePath() + QDir::separator() + FORM_FILE_NAME);
-        loadControllerFormFromXML(&conXMLFile, uiInfo);
+        loadConFormFromXML(&conXMLFile, uiInfo);
     }
 
     /* GUI */
@@ -201,13 +201,13 @@ void qMessageOutput(QtMsgType type, const QMessageLogContext &context, const QSt
     }
 }
 
-void loadSkinFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
+void loadMainFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
 {
     if (file->exists() == false) {
         qFatal("%s is not found", qPrintable(file->fileName()));
     }
 
-    qDebug("skin form is loaded from %s", qPrintable(file->fileName()));
+    qDebug("main form is loaded from %s", qPrintable(file->fileName()));
 
     qmlRegisterType<EmulatorUIType>("EmulatorComponent", 1, 0, "EmulatorUI");
     qmlRegisterType<FormListType>("EmulatorComponent", 1, 0, "FormList");
@@ -234,14 +234,14 @@ void loadSkinFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
 
         FormListType *formListType = uiType->formListType();
         for (int index = 0; index < formListType->getFormList()->count(); index++) {
-            SkinForm *form = new SkinForm(); /* dst */
+            MainForm *mainForm = new MainForm(); /* dst */
 
             formType = (FormType *)formListType->getFormList()->at(index); /* src */
 
-            form->displayRegion = formType->getDisplayRegion();
-            form->skinImg[SkinForm::normal].load(fileInfo.absolutePath()
+            mainForm->displayRegion = formType->getDisplayRegion();
+            mainForm->skinImg[MainForm::normal].load(fileInfo.absolutePath()
                 + QDir::separator() + formType->mainImageName());
-            form->skinImg[SkinForm::pressed].load(fileInfo.absolutePath()
+            mainForm->skinImg[MainForm::pressed].load(fileInfo.absolutePath()
                 + QDir::separator() + formType->pressedImageName());
 
             keyListType = formType->keyListType();
@@ -249,13 +249,13 @@ void loadSkinFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
                 for (int i = 0; i < keyListType->getKeyList()->count(); i++) {
                     hwKeyType = keyListType->getKeyList()->at(i);
                     if (hwKeyType != NULL) {
-                        form->keyList.append(new HardwareKey(hwKeyType->objectName(),
+                        mainForm->keyList.append(new HardwareKey(hwKeyType->objectName(),
                             hwKeyType->keycode(), hwKeyType->region(), hwKeyType->tooltip()));
                     }
                 }
             }
 
-            uiInfo->formList.append(form);
+            uiInfo->mainFormList.append(mainForm);
         }
 
         delete object;
@@ -265,7 +265,7 @@ void loadSkinFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
     delete engine;
 }
 
-void loadControllerFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
+void loadConFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
 {
     if (file->exists() == false) {
         qWarning("%s is not found", qPrintable(file->fileName()));
@@ -292,10 +292,10 @@ void loadControllerFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
         KeyListType *keyListType = NULL;
         HardwareKeyType *hwKeyType = NULL;
 
-        ControllerForm *form = new ControllerForm(fileInfo.dir().dirName());
-        form->conImg[ControllerForm::normal].load(fileInfo.absolutePath()
+        ControllerForm *conForm = new ControllerForm(fileInfo.dir().dirName());
+        conForm->conImg[ControllerForm::normal].load(fileInfo.absolutePath()
             + QDir::separator() + formType->mainImageName());
-        form->conImg[ControllerForm::pressed].load(fileInfo.absolutePath()
+        conForm->conImg[ControllerForm::pressed].load(fileInfo.absolutePath()
             + QDir::separator() + formType->pressedImageName());
 
         keyListType = formType->keyListType();
@@ -303,13 +303,13 @@ void loadControllerFormFromXML(QFile *file, UIInformation *uiInfo/* out */)
             for (int i = 0; i < keyListType->getKeyList()->count(); i++) {
                 hwKeyType = keyListType->getKeyList()->at(i);
                 if (hwKeyType != NULL) {
-                    form->keyList.append(new HardwareKey(hwKeyType->objectName(),
+                    conForm->keyList.append(new HardwareKey(hwKeyType->objectName(),
                         hwKeyType->keycode(), hwKeyType->region(), hwKeyType->tooltip()));
                 }
             }
         }
 
-        uiInfo->controllerList.append(form);
+        uiInfo->conFormList.append(conForm);
 
         delete object;
     }
@@ -324,8 +324,9 @@ int getControlIndex()
     int controlPriority = 0;
     int priority = CONTROL_PRIORITY_MAX;
 
-    if (!uiInfo)
+    if (!uiInfo) {
         return controlIndex;
+    }
 
     /* find high priority*/
     QString line;
index 882329bf293ba244ab4f1d1f1cbbe69af661d9a5..498adede845bd9db8e6f199260c1674bbb5f1e5b 100644 (file)
@@ -16,7 +16,7 @@ obj-$(CONFIG_QT) += mainwindow.o moc_mainwindow.o
 obj-$(CONFIG_QT) += skinbezelitem.o
 obj-$(CONFIG_QT) += skincontrollerview.o
 obj-$(CONFIG_QT) += skinkeyitem.o
-obj-$(CONFIG_QT) += skinform.o
+obj-$(CONFIG_QT) += mainform.o
 obj-$(CONFIG_QT) += keyboardhelper.o
 obj-$(CONFIG_QT) += skinview.o
 obj-$(CONFIG_QT) += uiinformation.o
index 6e3fed03e8195e4cb3b94b841671e5ea01523ea1..1af6e2c87badba7498e66b82482b1ad8b29cfe14 100644 (file)
@@ -44,7 +44,7 @@ DisplayBase::DisplayBase(QSize resolution, QWidget *w)
     // TODO: compare display region with resolution
 
     MainWindow *win = ((MainWindow *)w->parent()->parent());
-    rotateAngle = win->getUIState()->formAngle;
+    rotateAngle = win->getUIState()->mainFormAngle;
     scaleFactor = win->getUIState()->getScaleFactor();
 }
 
@@ -88,7 +88,7 @@ void DisplayBase::handleResize(QResizeEvent *event)
     qDebug("resize display");
 
     MainWindow *win = ((MainWindow *)w->parent()->parent());
-    SkinForm *form = win->uiInfo->getForm();
+    MainForm *form = win->uiInfo->getMainForm();
 
     const qreal sx = scaleFactor;
     const qreal sy = scaleFactor;
diff --git a/tizen/src/ui/mainform.cpp b/tizen/src/ui/mainform.cpp
new file mode 100644 (file)
index 0000000..c707786
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#include "mainform.h"
+
+MainForm::MainForm() :
+    displayRegion(0, 0, 0, 0)
+{
+}
+
+MainForm::~MainForm()
+{
+    qDebug("destroy main form");
+
+    for (int i = 0; i < keyList.count(); i++) {
+        delete keyList.at(i);
+    }
+    keyList.clear();
+}
diff --git a/tizen/src/ui/mainform.h b/tizen/src/ui/mainform.h
new file mode 100644 (file)
index 0000000..28bcede
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Qt UI
+ *
+ * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * GiWoong Kim <giwoong.kim@samsung.com>
+ * Sangho Park <sangho1206.park@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+#ifndef MAINFORM_H
+#define MAINFORM_H
+
+#include <QtWidgets>
+
+#include "hardwarekey.h"
+
+class MainForm
+{
+    Q_ENUMS(SkinImgType)
+
+public:
+    MainForm();
+    ~MainForm();
+
+    QImage skinImg[2];
+    QRect displayRegion;
+    QList<HardwareKey *> keyList;
+
+    enum SkinImgType {
+        normal = 0,
+        pressed = 1
+    };
+};
+
+#endif // MAINFORM_H
index b597adb6257c9b94e9af3605462041ef613be637..4ee0f7472c4a7354abb5b4d0f5eabb1450df061a 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 #include "mainwindow.h"
-#include "skinform.h"
+#include "mainform.h"
 #include "displayglwidget.h"
 #include "displayswwidget.h"
 
@@ -198,12 +198,12 @@ void MainWindow::openController(int index, bool docking)
 
     closeController();
 
-    if (uiInfo->controllerList.count() <= index) {
+    if (uiInfo->conFormList.count() <= index) {
         qWarning("controller index out of range");
         return;
     }
 
-    ControllerForm *conForm = uiInfo->controllerList.at(index);
+    ControllerForm *conForm = uiInfo->conFormList.at(index);
     if (conForm == NULL) {
         qWarning("controller is null");
         return;
@@ -254,12 +254,12 @@ void MainWindow::resizeEvent(QResizeEvent *event)
 {
     qDebug("resize main window");
 
-    resize(uiInfo->getFormSize().width(),
-        uiInfo->getFormSize().height());
+    resize(uiInfo->getMainFormSize().width(),
+        uiInfo->getMainFormSize().height());
 
-    SkinForm *form = uiInfo->getForm();
-    if (form != NULL) {
-        setRegion(form->skinImg[SkinForm::normal]);
+    MainForm *mainForm = uiInfo->getMainForm();
+    if (mainForm != NULL) {
+        setRegion(mainForm->skinImg[MainForm::normal]);
     }
 }
 
@@ -267,10 +267,10 @@ void MainWindow::rotate(int angle)
 {
     qDebug("window rotate : %d", angle);
 
-    getUIState()->formAngle = angle;
+    getUIState()->mainFormAngle = angle;
 
     skinView->rotate();
-    display->rotate(getUIState()->formAngle);
+    display->rotate(getUIState()->mainFormAngle);
 
     adjustSize();
 }
@@ -279,10 +279,10 @@ void MainWindow::scale(int scale)
 {
     qDebug("window scale : %d", scale);
 
-    getUIState()->formScale = scale;
+    getUIState()->mainFormScale = scale;
 
     skinView->adjustSize();
-    display->scale(getUIState()->formScale);
+    display->scale(getUIState()->mainFormScale);
 
     adjustSize();
 }
index fdd3ac61b0b6a7ec6f3bd3b7ca4b2e39a8c02895..637001c43c45a004868b4eac081a604655d6c539 100644 (file)
@@ -64,7 +64,7 @@ void ContextMenu::createItems() {
 #endif
 
     /* = Rotate menu = */
-    if (win->uiInfo->formList.count() > 1) {
+    if (win->uiInfo->mainFormList.count() > 1) {
         QMenu *rotateMenu = addMenu(QIcon(QPixmap(":/icons/rotate.png")), "&Rotate");
         QActionGroup *rotateGroup = new QActionGroup(this);
         rotateMapper = new QSignalMapper(this);
@@ -94,7 +94,7 @@ void ContextMenu::createItems() {
         rotateMapper->setMapping(action, 90);
         connect(action, SIGNAL(triggered()), rotateMapper, SLOT(map()));
 
-        action = (QAction *)rotateMapper->mapping(win->getUIState()->formAngle);
+        action = (QAction *)rotateMapper->mapping(win->getUIState()->mainFormAngle);
         action->setChecked(true);
     }
     /* =============== */
@@ -131,20 +131,20 @@ void ContextMenu::createItems() {
 
     // TODO: interpolation
 
-    action = (QAction *)scaleMapper->mapping(win->getUIState()->formScale);
+    action = (QAction *)scaleMapper->mapping(win->getUIState()->mainFormScale);
     action->setChecked(true);
     /* ============== */
 
     /* = Controller menu = */
     QMenu *controllerMenu = NULL;
-    if (win->uiInfo->controllerList.isEmpty() == false) {
+    if (win->uiInfo->conFormList.isEmpty() == false) {
         controllerMenu = addMenu("Controller");
         QActionGroup *controllerGroup = new QActionGroup(this);
         controllerMapper = new QSignalMapper(this);
         connect(controllerMapper, SIGNAL(mapped(int)), this, SLOT(slotController(int)));
 
-        for (int i = 0; i < win->uiInfo->controllerList.count(); i++) {
-            action = controllerMenu->addAction(win->uiInfo->controllerList.at(i)->name);
+        for (int i = 0; i < win->uiInfo->conFormList.count(); i++) {
+            action = controllerMenu->addAction(win->uiInfo->conFormList.at(i)->name);
             action->setActionGroup(controllerGroup);
             action->setCheckable(true);
             controllerMapper->setMapping(action, i);
diff --git a/tizen/src/ui/skinform.cpp b/tizen/src/ui/skinform.cpp
deleted file mode 100644 (file)
index 54d9cbf..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Qt UI
- *
- * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * GiWoong Kim <giwoong.kim@samsung.com>
- * Sangho Park <sangho1206.park@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#include "skinform.h"
-
-SkinForm::SkinForm() :
-    displayRegion(0, 0, 0, 0)
-{
-}
-
-SkinForm::~SkinForm()
-{
-    qDebug("destroy skin form");
-
-    for (int i = 0; i < keyList.count(); i++) {
-        delete keyList.at(i);
-    }
-    keyList.clear();
-}
diff --git a/tizen/src/ui/skinform.h b/tizen/src/ui/skinform.h
deleted file mode 100644 (file)
index 775aeda..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Qt UI
- *
- * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * GiWoong Kim <giwoong.kim@samsung.com>
- * Sangho Park <sangho1206.park@samsung.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-#ifndef SKINFORM_H
-#define SKINFORM_H
-
-#include <QtWidgets>
-
-#include "hardwarekey.h"
-
-class SkinForm
-{
-    Q_ENUMS(SkinImgType)
-
-public:
-    SkinForm();
-    ~SkinForm();
-
-    QImage skinImg[2];
-    QRect displayRegion;
-    QList<HardwareKey *> keyList;
-
-    enum SkinImgType {
-        normal = 0,
-        pressed = 1
-    };
-};
-
-#endif // SKINFORM_H
index 6637d58ed57e1ac4599ccff5f16939000f4e5273..531cd351045e82513c3407cac983ef5e641ed207 100644 (file)
@@ -53,10 +53,10 @@ SkinView::SkinView(QGraphicsScene *scene, QWidget *parent) :
 void SkinView::createItems()
 {
     MainWindow *win = ((MainWindow *)this->parent());
-    SkinForm *form = win->uiInfo->getForm();
+    MainForm *form = win->uiInfo->getMainForm();
 
     /* bezel */
-    SkinBezelItem *bezelItem = new SkinBezelItem(form->skinImg[SkinForm::normal]);
+    SkinBezelItem *bezelItem = new SkinBezelItem(form->skinImg[MainForm::normal]);
     scene()->addItem(bezelItem);
 
     /* HW keys */
@@ -66,7 +66,7 @@ void SkinView::createItems()
     for (int i = 0; i < keyList.count(); i++) {
         hwKey = keyList.at(i);
         if (hwKey != NULL) {
-            new SkinKeyItem(form->skinImg[SkinForm::pressed].copy(hwKey->region),
+            new SkinKeyItem(form->skinImg[MainForm::pressed].copy(hwKey->region),
                     hwKey, bezelItem);
         }
     }
@@ -89,8 +89,8 @@ void SkinView::resizeEvent(QResizeEvent *event)
     MainWindow *win = ((MainWindow *)this->parent());
 
     /* geometry */
-    const int width = win->uiInfo->getFormSize().width();
-    const int height = win->uiInfo->getFormSize().height();
+    const int width = win->uiInfo->getMainFormSize().width();
+    const int height = win->uiInfo->getMainFormSize().height();
     setGeometry(0, 0, width, height);
 
     /* scaling */
index d3c50ea711d6f6b4f27e28adc9557475441ec824..431a7e5b28b9fc8ff020f4b480a6d7685407081d 100644 (file)
@@ -35,39 +35,39 @@ UIInformation::UIInformation() :
     skinPath = "./";
 }
 
-SkinForm *UIInformation::getForm()
+MainForm *UIInformation::getMainForm()
 {
-    if (uiState.getFormIndex() > (formList.count() - 1)
-            || uiState.getFormIndex() < 0) {
+    if (uiState.getMainFormIndex() > (mainFormList.count() - 1)
+            || uiState.getMainFormIndex() < 0) {
         qWarning("invalid form found");
 
-        uiState.formAngle = 0;
+        uiState.mainFormAngle = 0;
     }
 
-    return formList.at(uiState.getFormIndex());
+    return mainFormList.at(uiState.getMainFormIndex());
 }
 
-QSize UIInformation::getFormSize()
+QSize UIInformation::getMainFormSize()
 {
-    SkinForm *form = getForm();
+    MainForm *form = getMainForm();
     if (form == NULL) {
         return QSize(0, 0);
     }
 
-    return form->skinImg[SkinForm::normal].size() * uiState.getScaleFactor();
+    return form->skinImg[MainForm::normal].size() * uiState.getScaleFactor();
 }
 
 UIInformation::~UIInformation()
 {
     qDebug("destroy UI info");
 
-    for (int i = 0; i < formList.count(); i++) {
-        delete formList.at(i);
+    for (int i = 0; i < mainFormList.count(); i++) {
+        delete mainFormList.at(i);
     }
-    formList.clear();
+    mainFormList.clear();
 
-    for (int i = 0; i < controllerList.count(); i++) {
-        delete controllerList.at(i);
+    for (int i = 0; i < conFormList.count(); i++) {
+        delete conFormList.at(i);
     }
-    controllerList.clear();
+    conFormList.clear();
 }
index eba9de22635423d379a8ebae3f1e8fb486abedd5..9c88a2e5c71c27a0954b6bcaa58d8816cf16f731 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <QtWidgets>
 
-#include "skinform.h"
+#include "mainform.h"
 #include "uistate.h"
 #include "controllerform.h"
 
@@ -48,14 +48,14 @@ public:
 
     QString skinPath;
     QString skinName;
-    QList<SkinForm *> formList;
-    QList<ControllerForm *> controllerList;
+    QList<MainForm *> mainFormList;
+    QList<ControllerForm *> conFormList;
     QColor hoverColor;
 
     UIState uiState; /* runtime information */
 
-    SkinForm *getForm(); /* current */
-    QSize getFormSize(); /* current */
+    MainForm *getMainForm(); /* current */
+    QSize getMainFormSize(); /* current */
 };
 
 #endif // UIINFORMATION_H
index d0b7442fbff4c49643ec67c670f59af6c3721f14..7f6c07cb885f75a0bb9d98b263cea1c7acb43ed5 100644 (file)
 #include "uistate.h"
 
 UIState::UIState() :
-    formAngle(0), formScale(100)
+    mainFormAngle(0), mainFormScale(100)
 {
     conState.floatingCon = NULL;
 }
 
-int UIState::getFormIndex(int angle)
+int UIState::getMainFormIndex(int angle)
 {
     // TODO: map
 
@@ -60,9 +60,9 @@ int UIState::getFormIndex(int angle)
     return index;
 }
 
-int UIState::getFormIndex()
+int UIState::getMainFormIndex()
 {
-    return getFormIndex(formAngle);
+    return getMainFormIndex(mainFormAngle);
 }
 
 qreal UIState::getScaleFactor(int scale)
@@ -72,5 +72,5 @@ qreal UIState::getScaleFactor(int scale)
 
 qreal UIState::getScaleFactor()
 {
-    return getScaleFactor(this->formScale);
+    return getScaleFactor(this->mainFormScale);
 }
index 280ee37b33f54ddef34282c594787d8839d73e9a..30579ee23eaf900a73a4d99f6161e96767d19f15 100644 (file)
@@ -47,13 +47,13 @@ class UIState
 public:
     UIState();
 
-    int getFormIndex(int angle);
-    int getFormIndex(); /* current */
+    int getMainFormIndex(int angle);
+    int getMainFormIndex(); /* current */
     qreal getScaleFactor(int scale);
     qreal getScaleFactor(); /* current */
 
-    int formAngle;
-    int formScale; /* percentage */
+    int mainFormAngle;
+    int mainFormScale; /* percentage */
 
     ControllerState conState;
 };