mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Theme Editor: Built a ui for the timer panel, not functional yet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27353 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9dd5f75966
commit
73a3747bc1
15 changed files with 391 additions and 4 deletions
|
|
@ -167,8 +167,19 @@ void EditorWindow::setupUI()
|
|||
deviceDock->setObjectName("deviceDock");
|
||||
deviceDock->setWidget(deviceConfig);
|
||||
deviceDock->setFloating(true);
|
||||
deviceDock->move(QPoint(x() + width() / 2, y() + height() / 2));
|
||||
deviceDock->hide();
|
||||
|
||||
/* Positioning the timer panel */
|
||||
timerDock = new QDockWidget(tr("Timer"), this);
|
||||
timer = new SkinTimer(deviceConfig, timerDock);
|
||||
|
||||
timerDock->setObjectName("timerDock");
|
||||
timerDock->setWidget(timer);
|
||||
timerDock->setFloating(true);
|
||||
timerDock->move(QPoint(x() + width() / 2, y() + height() / 2));
|
||||
timerDock->hide();
|
||||
|
||||
shiftTab(-1);
|
||||
}
|
||||
|
||||
|
|
@ -183,6 +194,8 @@ void EditorWindow::setupMenus()
|
|||
this, SLOT(showPanel()));
|
||||
QObject::connect(ui->actionDevice_Configuration, SIGNAL(triggered()),
|
||||
deviceDock, SLOT(show()));
|
||||
QObject::connect(ui->actionTimer, SIGNAL(triggered()),
|
||||
timerDock, SLOT(show()));
|
||||
|
||||
/* Connecting the document management actions */
|
||||
QObject::connect(ui->actionNew_Document, SIGNAL(triggered()),
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "preferencesdialog.h"
|
||||
#include "skinviewer.h"
|
||||
#include "devicestate.h"
|
||||
#include "skintimer.h"
|
||||
|
||||
class ProjectModel;
|
||||
class TabContent;
|
||||
|
|
@ -99,6 +100,8 @@ private:
|
|||
SkinViewer* viewer;
|
||||
DeviceState* deviceConfig;
|
||||
QDockWidget* deviceDock;
|
||||
SkinTimer* timer;
|
||||
QDockWidget* timerDock;
|
||||
};
|
||||
|
||||
#endif // EDITORWINDOW_H
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
<addaction name="actionFile_Panel"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDevice_Configuration"/>
|
||||
<addaction name="actionTimer"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuEdit">
|
||||
<property name="title">
|
||||
|
|
@ -365,6 +366,14 @@
|
|||
<string>Ctrl+F</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionTimer">
|
||||
<property name="text">
|
||||
<string>T&imer</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+T</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>projectTree</tabstop>
|
||||
|
|
|
|||
58
utils/themeeditor/gui/skintimer.cpp
Normal file
58
utils/themeeditor/gui/skintimer.cpp
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* 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 "skintimer.h"
|
||||
#include "ui_skintimer.h"
|
||||
|
||||
const int SkinTimer::millisPerTick = 10;
|
||||
|
||||
SkinTimer::SkinTimer(DeviceState* device, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SkinTimer),
|
||||
device(device)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
SkinTimer::~SkinTimer()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SkinTimer::start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SkinTimer::stop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SkinTimer::tick()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SkinTimer::stateChange()
|
||||
{
|
||||
|
||||
}
|
||||
58
utils/themeeditor/gui/skintimer.h
Normal file
58
utils/themeeditor/gui/skintimer.h
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* 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 SKINTIMER_H
|
||||
#define SKINTIMER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
|
||||
#include "devicestate.h"
|
||||
|
||||
namespace Ui {
|
||||
class SkinTimer;
|
||||
}
|
||||
|
||||
class SkinTimer : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static const int millisPerTick;
|
||||
|
||||
SkinTimer(DeviceState* device, QWidget *parent = 0);
|
||||
~SkinTimer();
|
||||
|
||||
private slots:
|
||||
void start();
|
||||
void stop();
|
||||
void tick();
|
||||
void stateChange();
|
||||
|
||||
private:
|
||||
void setupUI();
|
||||
|
||||
Ui::SkinTimer *ui;
|
||||
DeviceState* device;
|
||||
|
||||
QTimer timer;
|
||||
unsigned long int elapsedTime;
|
||||
};
|
||||
|
||||
#endif // SKINTIMER_H
|
||||
232
utils/themeeditor/gui/skintimer.ui
Normal file
232
utils/themeeditor/gui/skintimer.ui
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SkinTimer</class>
|
||||
<widget class="QWidget" name="SkinTimer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>238</width>
|
||||
<height>204</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/windowicon.png</normaloff>:/resources/windowicon.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Speed</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>speedBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="speedBox">
|
||||
<property name="suffix">
|
||||
<string>x</string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>3.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.200000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Duration</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>spinBox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="suffix">
|
||||
<string>s</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="statusBar">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="startButton">
|
||||
<property name="text">
|
||||
<string>Start</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="stopButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="playButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/resources/play.png</normaloff>:/resources/resources/play.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="pauseButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/resources/pause.png</normaloff>:/resources/resources/pause.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="rwndButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/resources/rwnd.png</normaloff>:/resources/resources/rwnd.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="ffwdButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources.qrc">
|
||||
<normaloff>:/resources/resources/ffwd.png</normaloff>:/resources/resources/ffwd.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoExclusive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -9,6 +9,10 @@
|
|||
<file>resources/zoomeven.png</file>
|
||||
<file>resources/zoomin.png</file>
|
||||
<file>resources/zoomout.png</file>
|
||||
<file>resources/play.png</file>
|
||||
<file>resources/ffwd.png</file>
|
||||
<file>resources/pause.png</file>
|
||||
<file>resources/rwnd.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/render">
|
||||
<file alias="scenebg.png">resources/render/scenebg.png</file>
|
||||
|
|
|
|||
BIN
utils/themeeditor/resources/ffwd.png
Normal file
BIN
utils/themeeditor/resources/ffwd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 596 B |
BIN
utils/themeeditor/resources/ffwd.xcf
Normal file
BIN
utils/themeeditor/resources/ffwd.xcf
Normal file
Binary file not shown.
BIN
utils/themeeditor/resources/pause.png
Normal file
BIN
utils/themeeditor/resources/pause.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 355 B |
BIN
utils/themeeditor/resources/pause.xcf
Normal file
BIN
utils/themeeditor/resources/pause.xcf
Normal file
Binary file not shown.
BIN
utils/themeeditor/resources/play.png
Normal file
BIN
utils/themeeditor/resources/play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 495 B |
BIN
utils/themeeditor/resources/play.xcf
Normal file
BIN
utils/themeeditor/resources/play.xcf
Normal file
Binary file not shown.
BIN
utils/themeeditor/resources/rwnd.png
Normal file
BIN
utils/themeeditor/resources/rwnd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 614 B |
|
|
@ -52,7 +52,8 @@ HEADERS += models/parsetreemodel.h \
|
|||
gui/findreplacedialog.h \
|
||||
graphics/rbtext.h \
|
||||
graphics/rbfontcache.h \
|
||||
graphics/rbtextcache.h
|
||||
graphics/rbtextcache.h \
|
||||
gui/skintimer.h
|
||||
SOURCES += main.cpp \
|
||||
models/parsetreemodel.cpp \
|
||||
models/parsetreenode.cpp \
|
||||
|
|
@ -75,7 +76,8 @@ SOURCES += main.cpp \
|
|||
gui/findreplacedialog.cpp \
|
||||
graphics/rbtext.cpp \
|
||||
graphics/rbfontcache.cpp \
|
||||
graphics/rbtextcache.cpp
|
||||
graphics/rbtextcache.cpp \
|
||||
gui/skintimer.cpp
|
||||
OTHER_FILES += README \
|
||||
resources/windowicon.png \
|
||||
resources/appicon.xcf \
|
||||
|
|
@ -85,12 +87,20 @@ OTHER_FILES += README \
|
|||
resources/document-new.png \
|
||||
resources/deviceoptions \
|
||||
resources/render/statusbar.png \
|
||||
resources/render/scenebg.png
|
||||
resources/render/scenebg.png \
|
||||
resources/play.xcf \
|
||||
resources/play.png \
|
||||
resources/rwnd.png \
|
||||
resources/pause.xcf \
|
||||
resources/pause.png \
|
||||
resources/ffwd.xcf \
|
||||
resources/ffwd.png
|
||||
FORMS += gui/editorwindow.ui \
|
||||
gui/preferencesdialog.ui \
|
||||
gui/configdocument.ui \
|
||||
gui/skinviewer.ui \
|
||||
gui/findreplacedialog.ui
|
||||
gui/findreplacedialog.ui \
|
||||
gui/skintimer.ui
|
||||
RESOURCES += resources.qrc
|
||||
win32:RC_FILE = themeeditor.rc
|
||||
macx {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue