From: GiWoong Kim Date: Wed, 22 Apr 2015 06:19:53 +0000 (+0900) Subject: layout: moved layout source code files X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~491 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=803278b409418de10dddf84b48365fa4ac9cab9d;p=sdk%2Femulator%2Fqemu.git layout: moved layout source code files tizen/src/ui/controllerform.cpp -> tizen/src/ui/layout/controllerform.cpp tizen/src/ui/displaytype.cpp -> tizen/src/ui/layout/displaytype.cpp tizen/src/ui/hardwarekey.cpp -> tizen/src/ui/layout/hardwarekey.cpp tizen/src/ui/hovertype.cpp -> tizen/src/ui/layout/hovertype.cpp tizen/src/ui/layoutform.cpp -> tizen/src/ui/layout/layoutform.cpp tizen/src/ui/mainform.cpp -> tizen/src/ui/layout/mainform.cpp Change-Id: I63e54b437ebde8f433a6f614a8790d4847496668 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/display/qt5_supplement.cpp b/tizen/src/display/qt5_supplement.cpp index 41af9f39c7..553d64b778 100644 --- a/tizen/src/display/qt5_supplement.cpp +++ b/tizen/src/display/qt5_supplement.cpp @@ -32,7 +32,7 @@ #include "qt5_supplement.h" #include "mainwindow.h" -#include "hardwarekey.h" +#include "layout/hardwarekey.h" #include "xmllayoutparser.h" #include "uiutil.h" diff --git a/tizen/src/display/xmllayoutparser.h b/tizen/src/display/xmllayoutparser.h index d3b65c848f..3155da9d30 100644 --- a/tizen/src/display/xmllayoutparser.h +++ b/tizen/src/display/xmllayoutparser.h @@ -33,11 +33,11 @@ #include #include "uiinformation.h" -#include "mainform.h" +#include "layout/mainform.h" #include "menu/menuitem.h" #include "menu/advancedmenuitem.h" #include "menu/scalemenuitem.h" -#include "controllerform.h" +#include "layout/controllerform.h" class XmlLayoutParser { diff --git a/tizen/src/ui/Makefile.objs b/tizen/src/ui/Makefile.objs index d792f54c8f..e4c2e4d5ad 100644 --- a/tizen/src/ui/Makefile.objs +++ b/tizen/src/ui/Makefile.objs @@ -5,18 +5,12 @@ $(obj)/qrc_resource.o: $(obj)/qrc_resource.cpp $(obj)/qrc_resource.cpp: $(TIZEN_UI)/resource/resource.qrc rcc -name resource $< -o $@ -obj-$(CONFIG_QT) += controllerform.o obj-$(CONFIG_QT) += displaybase.o obj-$(CONFIG_QT) += displayglwidget.o moc_displayglwidget.o obj-$(CONFIG_QT) += displayswwidget.o moc_displayswwidget.o -obj-$(CONFIG_QT) += hardwarekey.o obj-$(CONFIG_QT) += mainwindow.o moc_mainwindow.o obj-$(CONFIG_QT) += skinbezelitem.o obj-$(CONFIG_QT) += skinkeyitem.o moc_skinkeyitem.o -obj-$(CONFIG_QT) += displaytype.o -obj-$(CONFIG_QT) += hovertype.o -obj-$(CONFIG_QT) += layoutform.o -obj-$(CONFIG_QT) += mainform.o obj-$(CONFIG_QT) += skinview.o obj-$(CONFIG_QT) += skinpainter.o obj-$(CONFIG_QT) += uiinformation.o @@ -26,6 +20,7 @@ obj-$(CONFIG_QT) += qrc_resource.o obj-$(CONFIG_QT) += controller/ obj-$(CONFIG_QT) += input/ +obj-$(CONFIG_QT) += layout/ obj-$(CONFIG_QT) += menu/ $(obj)/moc_displayglwidget.o: $(obj)/moc_displayglwidget.cpp diff --git a/tizen/src/ui/controller/dockingcontroller.h b/tizen/src/ui/controller/dockingcontroller.h index d183eacccf..f0c0e04a87 100644 --- a/tizen/src/ui/controller/dockingcontroller.h +++ b/tizen/src/ui/controller/dockingcontroller.h @@ -32,7 +32,7 @@ #include -#include "controllerform.h" +#include "layout/controllerform.h" #include "dockingconview.h" class MainWindow; diff --git a/tizen/src/ui/controller/dockingconview.h b/tizen/src/ui/controller/dockingconview.h index 9579b46cad..46c67bf913 100644 --- a/tizen/src/ui/controller/dockingconview.h +++ b/tizen/src/ui/controller/dockingconview.h @@ -34,7 +34,7 @@ #include "skinview.h" #include "skinbezelitem.h" -#include "controllerform.h" +#include "layout/controllerform.h" class DockingController; diff --git a/tizen/src/ui/controller/floatingcontroller.h b/tizen/src/ui/controller/floatingcontroller.h index 24aabab957..5a778df094 100644 --- a/tizen/src/ui/controller/floatingcontroller.h +++ b/tizen/src/ui/controller/floatingcontroller.h @@ -32,7 +32,7 @@ #include -#include "controllerform.h" +#include "layout/controllerform.h" #include "floatingconview.h" class FloatingController : public QDialog diff --git a/tizen/src/ui/controller/floatingconview.h b/tizen/src/ui/controller/floatingconview.h index 164e964433..41a753fb7c 100644 --- a/tizen/src/ui/controller/floatingconview.h +++ b/tizen/src/ui/controller/floatingconview.h @@ -34,7 +34,7 @@ #include "skinview.h" #include "skinbezelitem.h" -#include "controllerform.h" +#include "layout/controllerform.h" class FloatingController; diff --git a/tizen/src/ui/controller/generalpurposecon.h b/tizen/src/ui/controller/generalpurposecon.h index 0a72aa91f4..fff187fa7c 100644 --- a/tizen/src/ui/controller/generalpurposecon.h +++ b/tizen/src/ui/controller/generalpurposecon.h @@ -34,7 +34,7 @@ #include #include -#include "hardwarekey.h" +#include "layout/hardwarekey.h" #define GPC_HEAD_SPACING (14) #define GPC_TAIL_SPACING (3) diff --git a/tizen/src/ui/controller/hwkeybutton.h b/tizen/src/ui/controller/hwkeybutton.h index 5e2d27fadf..b758c2672f 100644 --- a/tizen/src/ui/controller/hwkeybutton.h +++ b/tizen/src/ui/controller/hwkeybutton.h @@ -33,7 +33,7 @@ #include #include -#include "hardwarekey.h" +#include "layout/hardwarekey.h" class HWKeyButton : public QPushButton { diff --git a/tizen/src/ui/controllerform.cpp b/tizen/src/ui/controllerform.cpp deleted file mode 100644 index 4b1b924dd9..0000000000 --- a/tizen/src/ui/controllerform.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 "controllerform.h" - -ControllerForm::ControllerForm(const QString &name) : LayoutForm(name) -{ - /* do nothing */ -} - -ControllerForm::~ControllerForm() -{ - qDebug("destroy con layout"); -} diff --git a/tizen/src/ui/controllerform.h b/tizen/src/ui/controllerform.h deleted file mode 100644 index 79f5537215..0000000000 --- a/tizen/src/ui/controllerform.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 CONTROLLERFORM_H -#define CONTROLLERFORM_H - -#include - -#include "layoutform.h" -#include "hardwarekey.h" - -class ControllerForm : public LayoutForm -{ - Q_ENUMS(ConImgType) - -public: - ControllerForm(const QString &name); - ~ControllerForm(); - - QImage conImg[2]; - QList keyList; - QRect centerRect; - - enum ConImgType { - normal = 0, - pressed = 1 - }; -}; - -#endif // CONTROLLERFORM_H diff --git a/tizen/src/ui/displaytype.cpp b/tizen/src/ui/displaytype.cpp deleted file mode 100644 index 97073cfafe..0000000000 --- a/tizen/src/ui/displaytype.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 "displaytype.h" - -DisplayType::DisplayType(QRect rect, int angle) -{ - this->rect = rect; - this->angle = angle; -} - -void DisplayType::setRect(QRect rect) -{ - this->rect = rect; -} - -QRect DisplayType::getRect() -{ - return rect; -} - -int DisplayType::getAngle() -{ - return angle % 360; -} - -DisplayType::~DisplayType() -{ - /* do nothing */ -} diff --git a/tizen/src/ui/displaytype.h b/tizen/src/ui/displaytype.h deleted file mode 100644 index edfb59a893..0000000000 --- a/tizen/src/ui/displaytype.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 DISPLAYTYPE_H -#define DISPLAYTYPE_H - -#include - -class DisplayType -{ -public: - DisplayType(QRect rect, int angle); - ~DisplayType(); - - void setRect(QRect rect); - QRect getRect(); - int getAngle(); - -private: - QRect rect; - int angle; -}; - -#endif // DISPLAYTYPE_H diff --git a/tizen/src/ui/hardwarekey.cpp b/tizen/src/ui/hardwarekey.cpp deleted file mode 100644 index e525d3622f..0000000000 --- a/tizen/src/ui/hardwarekey.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 "hardwarekey.h" - -HardwareKey::HardwareKey(QString name, int keycode, QRect region, QString tooltip, QString keySequence) -{ - this->name = name; - this->keycode = keycode; - this->region = region; - this->tooltip = tooltip; - this->keySequence = keySequence; -} - -HardwareKey::~HardwareKey() -{ - qDebug("destroy HW key"); -} diff --git a/tizen/src/ui/hardwarekey.h b/tizen/src/ui/hardwarekey.h deleted file mode 100644 index 4b85f75161..0000000000 --- a/tizen/src/ui/hardwarekey.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 HARDWAREKEY_H -#define HARDWAREKEY_H - -#include - -class HardwareKey -{ -public: - HardwareKey(QString name, int keycode, QRect region, QString tooltip, QString keySequence); - ~HardwareKey(); - - QString name; - int keycode; - QRect region; - QString tooltip; - QString keySequence; -}; - -#endif // HARDWAREKEY_H diff --git a/tizen/src/ui/hovertype.cpp b/tizen/src/ui/hovertype.cpp deleted file mode 100644 index 028832bf18..0000000000 --- a/tizen/src/ui/hovertype.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 "hovertype.h" - -HoverType::HoverType(QColor color) -{ - this->color = color; - this->fill = false; -} - -QColor HoverType::getColor() -{ - return color; -} - -HoverType::~HoverType() -{ - /* do nothing */ -} diff --git a/tizen/src/ui/hovertype.h b/tizen/src/ui/hovertype.h deleted file mode 100644 index 1798f86f0a..0000000000 --- a/tizen/src/ui/hovertype.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 HOVERTYPE_H -#define HOVERTYPE_H - -#include - -class HoverType -{ -public: - HoverType(QColor color); - ~HoverType(); - - QColor getColor(); - -private: - QColor color; - bool fill; //TODO: -}; - -#endif // HOVERTYPE_H diff --git a/tizen/src/ui/input/keyboardshortcut.h b/tizen/src/ui/input/keyboardshortcut.h index 353472f73d..f178d99f8e 100644 --- a/tizen/src/ui/input/keyboardshortcut.h +++ b/tizen/src/ui/input/keyboardshortcut.h @@ -35,7 +35,7 @@ #include #include -#include "hardwarekey.h" +#include "layout/hardwarekey.h" #include "menu/menuitem.h" class MainWindow; diff --git a/tizen/src/ui/layout/Makefile.objs b/tizen/src/ui/layout/Makefile.objs new file mode 100644 index 0000000000..b10587af56 --- /dev/null +++ b/tizen/src/ui/layout/Makefile.objs @@ -0,0 +1,6 @@ +obj-$(CONFIG_QT) += layoutform.o +obj-$(CONFIG_QT) += mainform.o +obj-$(CONFIG_QT) += controllerform.o +obj-$(CONFIG_QT) += displaytype.o +obj-$(CONFIG_QT) += hardwarekey.o +obj-$(CONFIG_QT) += hovertype.o \ No newline at end of file diff --git a/tizen/src/ui/layout/controllerform.cpp b/tizen/src/ui/layout/controllerform.cpp new file mode 100644 index 0000000000..4b1b924dd9 --- /dev/null +++ b/tizen/src/ui/layout/controllerform.cpp @@ -0,0 +1,40 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 "controllerform.h" + +ControllerForm::ControllerForm(const QString &name) : LayoutForm(name) +{ + /* do nothing */ +} + +ControllerForm::~ControllerForm() +{ + qDebug("destroy con layout"); +} diff --git a/tizen/src/ui/layout/controllerform.h b/tizen/src/ui/layout/controllerform.h new file mode 100644 index 0000000000..79f5537215 --- /dev/null +++ b/tizen/src/ui/layout/controllerform.h @@ -0,0 +1,56 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 CONTROLLERFORM_H +#define CONTROLLERFORM_H + +#include + +#include "layoutform.h" +#include "hardwarekey.h" + +class ControllerForm : public LayoutForm +{ + Q_ENUMS(ConImgType) + +public: + ControllerForm(const QString &name); + ~ControllerForm(); + + QImage conImg[2]; + QList keyList; + QRect centerRect; + + enum ConImgType { + normal = 0, + pressed = 1 + }; +}; + +#endif // CONTROLLERFORM_H diff --git a/tizen/src/ui/layout/displaytype.cpp b/tizen/src/ui/layout/displaytype.cpp new file mode 100644 index 0000000000..97073cfafe --- /dev/null +++ b/tizen/src/ui/layout/displaytype.cpp @@ -0,0 +1,56 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 "displaytype.h" + +DisplayType::DisplayType(QRect rect, int angle) +{ + this->rect = rect; + this->angle = angle; +} + +void DisplayType::setRect(QRect rect) +{ + this->rect = rect; +} + +QRect DisplayType::getRect() +{ + return rect; +} + +int DisplayType::getAngle() +{ + return angle % 360; +} + +DisplayType::~DisplayType() +{ + /* do nothing */ +} diff --git a/tizen/src/ui/layout/displaytype.h b/tizen/src/ui/layout/displaytype.h new file mode 100644 index 0000000000..edfb59a893 --- /dev/null +++ b/tizen/src/ui/layout/displaytype.h @@ -0,0 +1,50 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 DISPLAYTYPE_H +#define DISPLAYTYPE_H + +#include + +class DisplayType +{ +public: + DisplayType(QRect rect, int angle); + ~DisplayType(); + + void setRect(QRect rect); + QRect getRect(); + int getAngle(); + +private: + QRect rect; + int angle; +}; + +#endif // DISPLAYTYPE_H diff --git a/tizen/src/ui/layout/hardwarekey.cpp b/tizen/src/ui/layout/hardwarekey.cpp new file mode 100644 index 0000000000..e525d3622f --- /dev/null +++ b/tizen/src/ui/layout/hardwarekey.cpp @@ -0,0 +1,44 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 "hardwarekey.h" + +HardwareKey::HardwareKey(QString name, int keycode, QRect region, QString tooltip, QString keySequence) +{ + this->name = name; + this->keycode = keycode; + this->region = region; + this->tooltip = tooltip; + this->keySequence = keySequence; +} + +HardwareKey::~HardwareKey() +{ + qDebug("destroy HW key"); +} diff --git a/tizen/src/ui/layout/hardwarekey.h b/tizen/src/ui/layout/hardwarekey.h new file mode 100644 index 0000000000..4b85f75161 --- /dev/null +++ b/tizen/src/ui/layout/hardwarekey.h @@ -0,0 +1,48 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 HARDWAREKEY_H +#define HARDWAREKEY_H + +#include + +class HardwareKey +{ +public: + HardwareKey(QString name, int keycode, QRect region, QString tooltip, QString keySequence); + ~HardwareKey(); + + QString name; + int keycode; + QRect region; + QString tooltip; + QString keySequence; +}; + +#endif // HARDWAREKEY_H diff --git a/tizen/src/ui/layout/hovertype.cpp b/tizen/src/ui/layout/hovertype.cpp new file mode 100644 index 0000000000..028832bf18 --- /dev/null +++ b/tizen/src/ui/layout/hovertype.cpp @@ -0,0 +1,46 @@ +/* + * Qt UI + * + * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 "hovertype.h" + +HoverType::HoverType(QColor color) +{ + this->color = color; + this->fill = false; +} + +QColor HoverType::getColor() +{ + return color; +} + +HoverType::~HoverType() +{ + /* do nothing */ +} diff --git a/tizen/src/ui/layout/hovertype.h b/tizen/src/ui/layout/hovertype.h new file mode 100644 index 0000000000..1798f86f0a --- /dev/null +++ b/tizen/src/ui/layout/hovertype.h @@ -0,0 +1,48 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 HOVERTYPE_H +#define HOVERTYPE_H + +#include + +class HoverType +{ +public: + HoverType(QColor color); + ~HoverType(); + + QColor getColor(); + +private: + QColor color; + bool fill; //TODO: +}; + +#endif // HOVERTYPE_H diff --git a/tizen/src/ui/layout/layoutform.cpp b/tizen/src/ui/layout/layoutform.cpp new file mode 100644 index 0000000000..2fcfd7b820 --- /dev/null +++ b/tizen/src/ui/layout/layoutform.cpp @@ -0,0 +1,71 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 + +#include "layoutform.h" + +LayoutForm::LayoutForm(const QString &name) +{ + this->name = name; + this->generalPurpose = false; + this->hoverType = NULL; +} + +QString LayoutForm::getName() +{ + return name; +} + +void LayoutForm::setGeneralPurpose(bool general) +{ + generalPurpose = general; +} + +bool LayoutForm::isGeneralPurpose() +{ + return generalPurpose; +} + +void LayoutForm::setHoverType(HoverType *hover) +{ + hoverType = hover; +} + +HoverType *LayoutForm::getHoverType() +{ + return hoverType; +} + +LayoutForm::~LayoutForm() +{ + if (hoverType != NULL) { + delete hoverType; + } +} diff --git a/tizen/src/ui/layout/layoutform.h b/tizen/src/ui/layout/layoutform.h new file mode 100644 index 0000000000..0e22566156 --- /dev/null +++ b/tizen/src/ui/layout/layoutform.h @@ -0,0 +1,55 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 LAYOUTFORM_H +#define LAYOUTFORM_H + +#include + +#include "hovertype.h" + +class LayoutForm +{ +public: + LayoutForm(const QString &name); + ~LayoutForm(); + + QString getName(); + void setGeneralPurpose(bool general); + bool isGeneralPurpose(); + void setHoverType(HoverType *hover); + HoverType *getHoverType(); + +private: + QString name; + bool generalPurpose; + HoverType *hoverType; +}; + +#endif // LAYOUTFORM_H diff --git a/tizen/src/ui/layout/mainform.cpp b/tizen/src/ui/layout/mainform.cpp new file mode 100644 index 0000000000..3076e7b98a --- /dev/null +++ b/tizen/src/ui/layout/mainform.cpp @@ -0,0 +1,49 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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(const QString &name) : LayoutForm(name) +{ + this->displayType = NULL; +} + +MainForm::~MainForm() +{ + qDebug("destroy main form"); + + if (displayType != NULL) { + delete displayType; + } + + for (int i = 0; i < keyList.count(); i++) { + delete keyList.at(i); + } + keyList.clear(); +} diff --git a/tizen/src/ui/layout/mainform.h b/tizen/src/ui/layout/mainform.h new file mode 100644 index 0000000000..9de052b751 --- /dev/null +++ b/tizen/src/ui/layout/mainform.h @@ -0,0 +1,57 @@ +/* + * Qt UI + * + * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * GiWoong Kim + * Sangho Park + * + * 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 + +#include "layoutform.h" +#include "displaytype.h" +#include "hardwarekey.h" + +class MainForm : public LayoutForm +{ + Q_ENUMS(SkinImgType) + +public: + MainForm(const QString &name); + ~MainForm(); + + DisplayType *displayType; + QImage skinImg[2]; + QList keyList; + + enum SkinImgType { + normal = 0, + pressed = 1 + }; +}; + +#endif // MAINFORM_H diff --git a/tizen/src/ui/layoutform.cpp b/tizen/src/ui/layoutform.cpp deleted file mode 100644 index 2fcfd7b820..0000000000 --- a/tizen/src/ui/layoutform.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 - -#include "layoutform.h" - -LayoutForm::LayoutForm(const QString &name) -{ - this->name = name; - this->generalPurpose = false; - this->hoverType = NULL; -} - -QString LayoutForm::getName() -{ - return name; -} - -void LayoutForm::setGeneralPurpose(bool general) -{ - generalPurpose = general; -} - -bool LayoutForm::isGeneralPurpose() -{ - return generalPurpose; -} - -void LayoutForm::setHoverType(HoverType *hover) -{ - hoverType = hover; -} - -HoverType *LayoutForm::getHoverType() -{ - return hoverType; -} - -LayoutForm::~LayoutForm() -{ - if (hoverType != NULL) { - delete hoverType; - } -} diff --git a/tizen/src/ui/layoutform.h b/tizen/src/ui/layoutform.h deleted file mode 100644 index 0e22566156..0000000000 --- a/tizen/src/ui/layoutform.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 LAYOUTFORM_H -#define LAYOUTFORM_H - -#include - -#include "hovertype.h" - -class LayoutForm -{ -public: - LayoutForm(const QString &name); - ~LayoutForm(); - - QString getName(); - void setGeneralPurpose(bool general); - bool isGeneralPurpose(); - void setHoverType(HoverType *hover); - HoverType *getHoverType(); - -private: - QString name; - bool generalPurpose; - HoverType *hoverType; -}; - -#endif // LAYOUTFORM_H diff --git a/tizen/src/ui/mainform.cpp b/tizen/src/ui/mainform.cpp deleted file mode 100644 index 3076e7b98a..0000000000 --- a/tizen/src/ui/mainform.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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(const QString &name) : LayoutForm(name) -{ - this->displayType = NULL; -} - -MainForm::~MainForm() -{ - qDebug("destroy main form"); - - if (displayType != NULL) { - delete displayType; - } - - 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 deleted file mode 100644 index 9de052b751..0000000000 --- a/tizen/src/ui/mainform.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Qt UI - * - * Copyright (C) 2014 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * GiWoong Kim - * Sangho Park - * - * 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 - -#include "layoutform.h" -#include "displaytype.h" -#include "hardwarekey.h" - -class MainForm : public LayoutForm -{ - Q_ENUMS(SkinImgType) - -public: - MainForm(const QString &name); - ~MainForm(); - - DisplayType *displayType; - QImage skinImg[2]; - QList keyList; - - enum SkinImgType { - normal = 0, - pressed = 1 - }; -}; - -#endif // MAINFORM_H diff --git a/tizen/src/ui/mainwindow.cpp b/tizen/src/ui/mainwindow.cpp index 997d7e1043..c7d55fa191 100644 --- a/tizen/src/ui/mainwindow.cpp +++ b/tizen/src/ui/mainwindow.cpp @@ -31,7 +31,7 @@ */ #include "mainwindow.h" -#include "mainform.h" +#include "layout/mainform.h" #include "displayglwidget.h" #include "displayswwidget.h" diff --git a/tizen/src/ui/skinkeyitem.h b/tizen/src/ui/skinkeyitem.h index 8f63440f54..5dad7f74c1 100644 --- a/tizen/src/ui/skinkeyitem.h +++ b/tizen/src/ui/skinkeyitem.h @@ -35,8 +35,8 @@ #include #include "skinbezelitem.h" -#include "hardwarekey.h" -#include "hovertype.h" +#include "layout/hardwarekey.h" +#include "layout/hovertype.h" extern "C" { #include "skin/maruskin_operation.h" diff --git a/tizen/src/ui/skinpainter.h b/tizen/src/ui/skinpainter.h index 9db0ff6196..bfd8771536 100644 --- a/tizen/src/ui/skinpainter.h +++ b/tizen/src/ui/skinpainter.h @@ -32,7 +32,7 @@ #include -#include "displaytype.h" +#include "layout/displaytype.h" class SkinPainter { diff --git a/tizen/src/ui/skinview.h b/tizen/src/ui/skinview.h index 33663e28b1..bec3a6852d 100644 --- a/tizen/src/ui/skinview.h +++ b/tizen/src/ui/skinview.h @@ -32,7 +32,7 @@ #include -#include "mainform.h" +#include "layout/mainform.h" #include "input/keyboardhelper.h" class MainWindow; diff --git a/tizen/src/ui/uiinformation.h b/tizen/src/ui/uiinformation.h index a5c415f7e9..1e8c02d12b 100644 --- a/tizen/src/ui/uiinformation.h +++ b/tizen/src/ui/uiinformation.h @@ -32,9 +32,9 @@ #include -#include "mainform.h" +#include "layout/mainform.h" #include "uistate.h" -#include "controllerform.h" +#include "layout/controllerform.h" #include "menu/menuitem.h" class UIInformation