From 73a3747bc1b33200207768b101bf56083416d756 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Thu, 8 Jul 2010 21:53:27 +0000 Subject: [PATCH] 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 --- utils/themeeditor/gui/editorwindow.cpp | 13 ++ utils/themeeditor/gui/editorwindow.h | 3 + utils/themeeditor/gui/editorwindow.ui | 9 + utils/themeeditor/gui/skintimer.cpp | 58 +++++++ utils/themeeditor/gui/skintimer.h | 58 +++++++ utils/themeeditor/gui/skintimer.ui | 232 +++++++++++++++++++++++++ utils/themeeditor/resources.qrc | 4 + utils/themeeditor/resources/ffwd.png | Bin 0 -> 596 bytes utils/themeeditor/resources/ffwd.xcf | Bin 0 -> 2584 bytes utils/themeeditor/resources/pause.png | Bin 0 -> 355 bytes utils/themeeditor/resources/pause.xcf | Bin 0 -> 1311 bytes utils/themeeditor/resources/play.png | Bin 0 -> 495 bytes utils/themeeditor/resources/play.xcf | Bin 0 -> 2749 bytes utils/themeeditor/resources/rwnd.png | Bin 0 -> 614 bytes utils/themeeditor/themeeditor.pro | 18 +- 15 files changed, 391 insertions(+), 4 deletions(-) create mode 100644 utils/themeeditor/gui/skintimer.cpp create mode 100644 utils/themeeditor/gui/skintimer.h create mode 100644 utils/themeeditor/gui/skintimer.ui create mode 100644 utils/themeeditor/resources/ffwd.png create mode 100644 utils/themeeditor/resources/ffwd.xcf create mode 100644 utils/themeeditor/resources/pause.png create mode 100644 utils/themeeditor/resources/pause.xcf create mode 100644 utils/themeeditor/resources/play.png create mode 100644 utils/themeeditor/resources/play.xcf create mode 100644 utils/themeeditor/resources/rwnd.png diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index 169dc3f6a1..b81e41a2f5 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -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()), diff --git a/utils/themeeditor/gui/editorwindow.h b/utils/themeeditor/gui/editorwindow.h index c2ae1770f2..6b09b79815 100644 --- a/utils/themeeditor/gui/editorwindow.h +++ b/utils/themeeditor/gui/editorwindow.h @@ -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 diff --git a/utils/themeeditor/gui/editorwindow.ui b/utils/themeeditor/gui/editorwindow.ui index 707e24698c..5ef3261acb 100644 --- a/utils/themeeditor/gui/editorwindow.ui +++ b/utils/themeeditor/gui/editorwindow.ui @@ -69,6 +69,7 @@ + @@ -365,6 +366,14 @@ Ctrl+F + + + T&imer + + + Ctrl+T + + projectTree diff --git a/utils/themeeditor/gui/skintimer.cpp b/utils/themeeditor/gui/skintimer.cpp new file mode 100644 index 0000000000..f228a2f097 --- /dev/null +++ b/utils/themeeditor/gui/skintimer.cpp @@ -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() +{ + +} diff --git a/utils/themeeditor/gui/skintimer.h b/utils/themeeditor/gui/skintimer.h new file mode 100644 index 0000000000..b6c8061028 --- /dev/null +++ b/utils/themeeditor/gui/skintimer.h @@ -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 +#include + +#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 diff --git a/utils/themeeditor/gui/skintimer.ui b/utils/themeeditor/gui/skintimer.ui new file mode 100644 index 0000000000..a9f5feafd7 --- /dev/null +++ b/utils/themeeditor/gui/skintimer.ui @@ -0,0 +1,232 @@ + + + SkinTimer + + + + 0 + 0 + 238 + 204 + + + + Form + + + + :/resources/windowicon.png:/resources/windowicon.png + + + + + + + + Speed + + + speedBox + + + + + + + x + + + 1 + + + 0.100000000000000 + + + 3.000000000000000 + + + 0.200000000000000 + + + 1.000000000000000 + + + + + + + Duration + + + spinBox + + + + + + + s + + + 1 + + + 1000 + + + 20 + + + + + + + + + 0 + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Start + + + + + + + false + + + Stop + + + + + + + + + + + + + + + :/resources/resources/play.png:/resources/resources/play.png + + + + 30 + 30 + + + + true + + + true + + + true + + + + + + + + + + + :/resources/resources/pause.png:/resources/resources/pause.png + + + + 30 + 30 + + + + true + + + false + + + true + + + + + + + + + + + :/resources/resources/rwnd.png:/resources/resources/rwnd.png + + + + 30 + 30 + + + + true + + + true + + + + + + + + + + + :/resources/resources/ffwd.png:/resources/resources/ffwd.png + + + + 30 + 30 + + + + true + + + true + + + + + + + + + + + + diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc index a000c3701e..87211b95e9 100644 --- a/utils/themeeditor/resources.qrc +++ b/utils/themeeditor/resources.qrc @@ -9,6 +9,10 @@ resources/zoomeven.png resources/zoomin.png resources/zoomout.png + resources/play.png + resources/ffwd.png + resources/pause.png + resources/rwnd.png resources/render/scenebg.png diff --git a/utils/themeeditor/resources/ffwd.png b/utils/themeeditor/resources/ffwd.png new file mode 100644 index 0000000000000000000000000000000000000000..8cf50ca048184c86a23d0a687325166e1242977d GIT binary patch literal 596 zcmV-a0;~OrP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igY+ z6dpTvfV@Ef000qmMObu0Z*6U5Zgc=pY+-pINn>wrfs`;v0005ENkl9BF(4|4RtB+C!NS5$P*5zy+WZGLvA3{@wT+dHh+rWKVk3f$g&PR#dH@ZW-q%$;hbjFucO2Qa94U58T9& z)Qyy}f@|BsNca3X)i2>Glh0wi!Tr!b$yTI0zTj+175P@Neh{})GV-U#-u{$~%v7vz zU_SL8S-@<{&ECdk97uVN+{5lv2jV(jSG{JNFjD*n6RmKJ8vE(m%EYhA8;w6Ze(`!*gGBWtM=kfNN^B_ i)nzi7OeT}b1pWdpOk3VFxMZ9F0000<_!!&{$#f zQWk>HD2P-FE&e_DV59^~t%{H;2_lhJl!y|{HefNjjb+oM^K<>q>`c4C^s!HR;LLpY zn{&>bd+)htCXq~Kl|!)sWgs~eC&>MlGH!-C9Jt&D-Nwp;5MMf+xC9wBFuEP;?;9s# zg=~Skq1&N%SeT7lpvRyrJodkkPDfMm117-^Oa`DX3!C@e9->|a43V=Q_qBqbHhD)K zcGhFI?^9|vb=Zt!@%1scB87)x-I&0_bjC8NR6Jc^Z%!=u%usYhc`TMmGb5QM$y78E z?@Z*9<{V(mB9&zwkqe}R`uqhjWF6+@Qxb|=0 zYCl(Q4%qcjJ{yfC(+Q=^eiz7*jYx~@JeW=vlw>;gay-xenSp_Pyl_21_Wn0jW7fO! z+F0Vu5_xtK`DSef_mHK$q7Ba#a+$%n63b*q*u)FvG7wO|h1rfvf_au8)W)0Ya6=t# ztiw&f9E+cOpgySWZ`WxXI7?h8DpTw{Ve8txo^w6KwuU?0bQi6KX2f5| z!laP#u5b$N;<%4?knyc>3%&d(-O11^w29qrk{SDiRvmB00Rwgj!w?>!FCL**9y^78 z*d%`I#X&L&m3Dk`1vc7yAtw%=$vH`XVv@Pa*xfj-Cg&op>FHlN*upT5vdMW!_q~pn z>*WWisYdxo>-ep9OQ9{*pg|B+&~Kj2)fuKon?J%6EDZdt+B!kgEPx-0($SmGbHfSo1^)<3qM z^S{I6V&L2jb*@lVe(L00`Nz{^kI2+cs$5!F#lgL7RKDCR5y{>8V)4liFS@2Cm;OW_ zSvKagl3Y4d6=L!HU^}{j-hD;{gj#vyqbeW&rO9@*R6T!%+l6kRQ(Rko|CO-Bou(*S zh5E;2MB>I-60*?F152c*D;Ve#VaA777%xPCjkm;hVH6pCa2-vEHgrPs@!Je5rq^q$ zVw=$Pugq}WUtpjw?Z<17_GP4}SN=vm+VW8ud8qQyB~DC_d?@@vHO`e}{938<{^@II zf$9k*yNsEt>e&Zn%ukgbpPI)PWNqq%LgCZgOF!$PHqw=zqNBLlqu`$<@&ix(LR7*U cR;9?qyb$vf5sB`ht5P^JIvT!818OuW^cj2T<~ur;B4q#=W;Q&+;BJ;Bnh;BraUaaxKeWw#m>-d!rMF zxO~8oe$TTDAKIRre&yF9aqqnmObiuH`k51_tP!)meJb#hLgqH9H*eH^CVlFjW%gv= zo4`|NQtls8pJ*QvZ`t`p&DhmHt+Zo}=+4E;leH_0po@SbHsVRWYo4R6>huM2+fSITSpG!j%Hw4-ug<=5!stt((e8ME<^z2@ ZnTtL(@HH7Z>X5eKr69 literal 0 HcmV?d00001 diff --git a/utils/themeeditor/resources/pause.xcf b/utils/themeeditor/resources/pause.xcf new file mode 100644 index 0000000000000000000000000000000000000000..e3dbb4560b39c9e3f31505eaa10db9c15bb47a6f GIT binary patch literal 1311 zcmd^;%TC)s7=_14ph>ueOIxv<1&d@6E|t1Vg_0c$q;9&eV{GHd7ZeAHu%VC8SE*pd zy3Z29Bd{2obDWtHsQU!{rQ`YL%>R$aGh;u9F65QtNiPUpf%v3F-h?a*k1c4IVyDf= zdIgUrX^*rG)dxR?pb$Gy4f+gy(9GnI&@YI=e*Ie<+mU-#7@UZ)0#zX<9I)+w7osmg zLR8-JVD1+=nv0x8?$2|ogVxJDZ`sU4-_$Pfdo1G^?_cw=VO=MQA~&9(Uo5iuHMFPl z#7Sa0ts*6eY~Str0}zZGEKtZtkZ0JzLSK>ShkC%JNAdRJlsDlq6Cig zPzR;Ml2S7+{|zj?N-u0Dh<$lv-UV}7W@@i{83z*?#Ll^!vOe*=)SdiUAglkj=FaO< z?v0Mh4?}3pjpK1I4efEtF>@D|!MsR0RM*VJhGsOPxxlFw8oys;Es3YmgHjJ8u`Zr^x3k%85C2JapV#v29*a}g zDzD^9UE@E?M)`7{jqoX|r;wmjPqak#NcRzLc1OCSr$~z4j5LGS$XB4v|E4Y5gVMb! R*;VXy$q8(ioYjq06VI-dC%gav literal 0 HcmV?d00001 diff --git a/utils/themeeditor/resources/play.png b/utils/themeeditor/resources/play.png new file mode 100644 index 0000000000000000000000000000000000000000..c439befc75e9a158e8491d0d6f6fbd9c97f97038 GIT binary patch literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPiJBNrg?-Ad-bAdvFC9V-A&iT2y zsd*&~0Xd143ZBXNd5u#HJb+dNdAc};WZZi@Q`eg%P^4}CUcSv8hfb_<6llJxWVU$2 zQ8R^}i}D5$N9I3Z+r7+mW=`1Yl%q)-eTD7KZk8O}Aa|OFr+bH1Q?cIj#_e}MwN$_V z$#B?!XYoNFM)m^>&IlT;4_v~2A|kG_R^f_D(f>}5sZ2MnC@I}P!Mfp5bBD!qx4C}H z`OmBrTghq5Ecqa$`$`dW&JTs4r!o=W99(k}k#o&YpvE0JidVWlet!2^@|Ahw|3{1wvr1MJy57yd zs8ICiu&m{l=hy9Av;)70_g=qs`bXopW2d^q!oPn|qd1YV=eb(ck{mMp8p&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nd.png b/utils/themeeditor/resources/rwnd.png new file mode 100644 index 0000000000000000000000000000000000000000..59fda485671d9dff78ac04439e943d228c131b0b GIT binary patch literal 614 zcmV-s0-61ZP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igY+ z6dw;xFL|{9000qmMObu0Z*6U5Zgc=pY+-pINn>wrfs`;v0005WNkl9BXF#+%tCOHr6jG!}XCWvSVy*u{8pTd5EbMJkrLhn!M8QH7!A=A_MG0zSr%n7( zSZGoxm#AE9CUAtkb$8v_?1uTm6wC6k&$F{L?>kE(kw_#GiQU8A2A?&Bqc{?-e?-34o1euod~)poW-XMBU@v+W?k*;U=ELRjAR+As*A$0@HzY} zU}oIV2|UEFlDa5d$CrN?7;U?LgL_yn7$9np(^x6+@T|A}r(}TIgY?1{c(R6xNu!L?V$$BodwFFQ;c5zyQN3z5oCK07*qoM6N<$f@azV A;{X5v literal 0 HcmV?d00001 diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro index 904adf239b..49e1be953a 100644 --- a/utils/themeeditor/themeeditor.pro +++ b/utils/themeeditor/themeeditor.pro @@ -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 {