From 58ad1e7c4b7e404d0bcda752914e2878c68feafd Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Wed, 23 Jun 2010 20:46:43 +0000 Subject: Theme Editor: Began working on device status dialog git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27097 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/devicestate.cpp | 35 +++++++++ utils/themeeditor/gui/devicestate.h | 41 +++++++++++ utils/themeeditor/gui/devicestate.ui | 130 +++++++++++++++++++++++++++++++++ utils/themeeditor/gui/editorwindow.cpp | 2 + utils/themeeditor/gui/editorwindow.h | 2 + utils/themeeditor/gui/editorwindow.ui | 19 +++-- utils/themeeditor/themeeditor.pro | 9 ++- 7 files changed, 229 insertions(+), 9 deletions(-) create mode 100644 utils/themeeditor/gui/devicestate.cpp create mode 100644 utils/themeeditor/gui/devicestate.h create mode 100644 utils/themeeditor/gui/devicestate.ui diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp new file mode 100644 index 0000000000..af0b846372 --- /dev/null +++ b/utils/themeeditor/gui/devicestate.cpp @@ -0,0 +1,35 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2010 Robert Bieber + * + * 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 software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include "devicestate.h" +#include "ui_devicestate.h" + +DeviceState::DeviceState(QWidget *parent) : + QWidget(parent), + ui(new Ui::DeviceState) +{ + ui->setupUi(this); +} + +DeviceState::~DeviceState() +{ + delete ui; +} diff --git a/utils/themeeditor/gui/devicestate.h b/utils/themeeditor/gui/devicestate.h new file mode 100644 index 0000000000..66cd98be78 --- /dev/null +++ b/utils/themeeditor/gui/devicestate.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2010 Robert Bieber + * + * 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 software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef DEVICESTATE_H +#define DEVICESTATE_H + +#include + +namespace Ui { + class DeviceState; +} + +class DeviceState : public QWidget { + Q_OBJECT +public: + DeviceState(QWidget *parent = 0); + virtual ~DeviceState(); + +private: + Ui::DeviceState *ui; +}; + +#endif // DEVICESTATE_H diff --git a/utils/themeeditor/gui/devicestate.ui b/utils/themeeditor/gui/devicestate.ui new file mode 100644 index 0000000000..17f6129c9e --- /dev/null +++ b/utils/themeeditor/gui/devicestate.ui @@ -0,0 +1,130 @@ + + + DeviceState + + + + 0 + 0 + 400 + 300 + + + + Device Settings + + + + :/resources/resources/windowicon.png:/resources/resources/windowicon.png + + + + + + 1 + + + + + 0 + 0 + 382 + 220 + + + + Device Basics + + + + + + + + Screen Width + + + widthBox + + + + + + + + + + + + + + Screen Height + + + heightBox + + + + + + + + + + + + + + Remote Width + + + rWidthBox + + + + + + + + + + + + + + Remote Height + + + rHeightBox + + + + + + + + + + + + + + 0 + 0 + 382 + 220 + + + + Device Status + + + + + + + + + + + diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index c40a420e98..2bd3b5343e 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -155,6 +155,8 @@ void EditorWindow::setupMenus() this, SLOT(showPanel())); QObject::connect(ui->actionPreview_Panel, SIGNAL(triggered()), this, SLOT(showPanel())); + QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()), + &deviceConfig, SLOT(show())); /* Connecting the document management actions */ QObject::connect(ui->actionNew_Document, SIGNAL(triggered()), diff --git a/utils/themeeditor/gui/editorwindow.h b/utils/themeeditor/gui/editorwindow.h index 08af08ac41..0bfaac3957 100644 --- a/utils/themeeditor/gui/editorwindow.h +++ b/utils/themeeditor/gui/editorwindow.h @@ -32,6 +32,7 @@ #include "configdocument.h" #include "preferencesdialog.h" #include "skinviewer.h" +#include "devicestate.h" class ProjectModel; class TabContent; @@ -88,6 +89,7 @@ private: ProjectModel* project; QItemSelectionModel* parseTreeSelection; SkinViewer* viewer; + DeviceState deviceConfig; }; #endif // EDITORWINDOW_H diff --git a/utils/themeeditor/gui/editorwindow.ui b/utils/themeeditor/gui/editorwindow.ui index 10e2c524c6..a7d804bd6b 100644 --- a/utils/themeeditor/gui/editorwindow.ui +++ b/utils/themeeditor/gui/editorwindow.ui @@ -14,7 +14,7 @@ Rockbox Theme Editor - + :/resources/resources/windowicon.png:/resources/resources/windowicon.png @@ -40,7 +40,7 @@ 0 0 628 - 25 + 27 @@ -67,6 +67,8 @@ + + @@ -248,7 +250,7 @@ - + :/resources/resources/document-new.png:/resources/resources/document-new.png @@ -260,7 +262,7 @@ - + :/resources/resources/document-open.png:/resources/resources/document-open.png @@ -275,7 +277,7 @@ false - + :/resources/resources/document-save.png:/resources/resources/document-save.png @@ -293,6 +295,11 @@ Ctrl+Shift+O + + + &Device Configuration + + projectTree @@ -301,7 +308,7 @@ editorTabs - + diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro index 05d117aa32..6237ee8f70 100644 --- a/utils/themeeditor/themeeditor.pro +++ b/utils/themeeditor/themeeditor.pro @@ -39,7 +39,8 @@ HEADERS += models/parsetreemodel.h \ graphics/rbviewport.h \ graphics/rbrenderinfo.h \ graphics/rbimage.h \ - graphics/rbfont.h + graphics/rbfont.h \ + gui/devicestate.h SOURCES += main.cpp \ models/parsetreemodel.cpp \ models/parsetreenode.cpp \ @@ -55,7 +56,8 @@ SOURCES += main.cpp \ graphics/rbviewport.cpp \ graphics/rbrenderinfo.cpp \ graphics/rbimage.cpp \ - graphics/rbfont.cpp + graphics/rbfont.cpp \ + gui/devicestate.cpp OTHER_FILES += README \ resources/windowicon.png \ resources/appicon.xcf \ @@ -66,5 +68,6 @@ OTHER_FILES += README \ FORMS += gui/editorwindow.ui \ gui/preferencesdialog.ui \ gui/configdocument.ui \ - gui/skinviewer.ui + gui/skinviewer.ui \ + gui/devicestate.ui RESOURCES += resources.qrc -- cgit v1.2.3