forked from len0rd/rockbox
Theme Editor: Began working on device status dialog
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27097 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6d6156603c
commit
58ad1e7c4b
7 changed files with 229 additions and 9 deletions
35
utils/themeeditor/gui/devicestate.cpp
Normal file
35
utils/themeeditor/gui/devicestate.cpp
Normal file
|
@ -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;
|
||||||
|
}
|
41
utils/themeeditor/gui/devicestate.h
Normal file
41
utils/themeeditor/gui/devicestate.h
Normal file
|
@ -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 <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class DeviceState;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeviceState : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DeviceState(QWidget *parent = 0);
|
||||||
|
virtual ~DeviceState();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DeviceState *ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DEVICESTATE_H
|
130
utils/themeeditor/gui/devicestate.ui
Normal file
130
utils/themeeditor/gui/devicestate.ui
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DeviceState</class>
|
||||||
|
<widget class="QWidget" name="DeviceState">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Device Settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../resources.qrc">
|
||||||
|
<normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QToolBox" name="toolBox">
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="page">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>382</width>
|
||||||
|
<height>220</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="label">
|
||||||
|
<string>Device Basics</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Screen Width</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>widthBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="widthBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Screen Height</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>heightBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="heightBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>Remote Width</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>rWidthBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="rWidthBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Remote Height</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>rHeightBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="rHeightBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>382</width>
|
||||||
|
<height>220</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<attribute name="label">
|
||||||
|
<string>Device Status</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources>
|
||||||
|
<include location="../resources.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
|
@ -155,6 +155,8 @@ void EditorWindow::setupMenus()
|
||||||
this, SLOT(showPanel()));
|
this, SLOT(showPanel()));
|
||||||
QObject::connect(ui->actionPreview_Panel, SIGNAL(triggered()),
|
QObject::connect(ui->actionPreview_Panel, SIGNAL(triggered()),
|
||||||
this, SLOT(showPanel()));
|
this, SLOT(showPanel()));
|
||||||
|
QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()),
|
||||||
|
&deviceConfig, SLOT(show()));
|
||||||
|
|
||||||
/* Connecting the document management actions */
|
/* Connecting the document management actions */
|
||||||
QObject::connect(ui->actionNew_Document, SIGNAL(triggered()),
|
QObject::connect(ui->actionNew_Document, SIGNAL(triggered()),
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "configdocument.h"
|
#include "configdocument.h"
|
||||||
#include "preferencesdialog.h"
|
#include "preferencesdialog.h"
|
||||||
#include "skinviewer.h"
|
#include "skinviewer.h"
|
||||||
|
#include "devicestate.h"
|
||||||
|
|
||||||
class ProjectModel;
|
class ProjectModel;
|
||||||
class TabContent;
|
class TabContent;
|
||||||
|
@ -88,6 +89,7 @@ private:
|
||||||
ProjectModel* project;
|
ProjectModel* project;
|
||||||
QItemSelectionModel* parseTreeSelection;
|
QItemSelectionModel* parseTreeSelection;
|
||||||
SkinViewer* viewer;
|
SkinViewer* viewer;
|
||||||
|
DeviceState deviceConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EDITORWINDOW_H
|
#endif // EDITORWINDOW_H
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<string>Rockbox Theme Editor</string>
|
<string>Rockbox Theme Editor</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset>
|
<normaloff>:/resources/resources/windowicon.png</normaloff>:/resources/resources/windowicon.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>628</width>
|
<width>628</width>
|
||||||
<height>25</height>
|
<height>27</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -67,6 +67,8 @@
|
||||||
<addaction name="actionPreview_Panel"/>
|
<addaction name="actionPreview_Panel"/>
|
||||||
<addaction name="actionDisplay_Panel"/>
|
<addaction name="actionDisplay_Panel"/>
|
||||||
<addaction name="actionFile_Panel"/>
|
<addaction name="actionFile_Panel"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionDevice_Configuration"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuView"/>
|
<addaction name="menuView"/>
|
||||||
|
@ -248,7 +250,7 @@
|
||||||
</action>
|
</action>
|
||||||
<action name="actionToolbarNew">
|
<action name="actionToolbarNew">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/resources/resources/document-new.png</normaloff>:/resources/resources/document-new.png</iconset>
|
<normaloff>:/resources/resources/document-new.png</normaloff>:/resources/resources/document-new.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -260,7 +262,7 @@
|
||||||
</action>
|
</action>
|
||||||
<action name="actionToolbarOpen">
|
<action name="actionToolbarOpen">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/resources/resources/document-open.png</normaloff>:/resources/resources/document-open.png</iconset>
|
<normaloff>:/resources/resources/document-open.png</normaloff>:/resources/resources/document-open.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -275,7 +277,7 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset resource="../resources.qrc">
|
||||||
<normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset>
|
<normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -293,6 +295,11 @@
|
||||||
<string>Ctrl+Shift+O</string>
|
<string>Ctrl+Shift+O</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDevice_Configuration">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Device Configuration</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>projectTree</tabstop>
|
<tabstop>projectTree</tabstop>
|
||||||
|
@ -301,7 +308,7 @@
|
||||||
<tabstop>editorTabs</tabstop>
|
<tabstop>editorTabs</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="resources.qrc"/>
|
<include location="../resources.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
|
|
|
@ -39,7 +39,8 @@ HEADERS += models/parsetreemodel.h \
|
||||||
graphics/rbviewport.h \
|
graphics/rbviewport.h \
|
||||||
graphics/rbrenderinfo.h \
|
graphics/rbrenderinfo.h \
|
||||||
graphics/rbimage.h \
|
graphics/rbimage.h \
|
||||||
graphics/rbfont.h
|
graphics/rbfont.h \
|
||||||
|
gui/devicestate.h
|
||||||
SOURCES += main.cpp \
|
SOURCES += main.cpp \
|
||||||
models/parsetreemodel.cpp \
|
models/parsetreemodel.cpp \
|
||||||
models/parsetreenode.cpp \
|
models/parsetreenode.cpp \
|
||||||
|
@ -55,7 +56,8 @@ SOURCES += main.cpp \
|
||||||
graphics/rbviewport.cpp \
|
graphics/rbviewport.cpp \
|
||||||
graphics/rbrenderinfo.cpp \
|
graphics/rbrenderinfo.cpp \
|
||||||
graphics/rbimage.cpp \
|
graphics/rbimage.cpp \
|
||||||
graphics/rbfont.cpp
|
graphics/rbfont.cpp \
|
||||||
|
gui/devicestate.cpp
|
||||||
OTHER_FILES += README \
|
OTHER_FILES += README \
|
||||||
resources/windowicon.png \
|
resources/windowicon.png \
|
||||||
resources/appicon.xcf \
|
resources/appicon.xcf \
|
||||||
|
@ -66,5 +68,6 @@ OTHER_FILES += README \
|
||||||
FORMS += gui/editorwindow.ui \
|
FORMS += gui/editorwindow.ui \
|
||||||
gui/preferencesdialog.ui \
|
gui/preferencesdialog.ui \
|
||||||
gui/configdocument.ui \
|
gui/configdocument.ui \
|
||||||
gui/skinviewer.ui
|
gui/skinviewer.ui \
|
||||||
|
gui/devicestate.ui
|
||||||
RESOURCES += resources.qrc
|
RESOURCES += resources.qrc
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue