Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Theme Editor: Added code generation with tabs

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26608 a1c6a512-1295-4272-9138-f99709370657

+25
+17
utils/themeeditor/editorwindow.cpp
··· 84 84 QObject::connect(ui->editorTabs, SIGNAL(tabCloseRequested(int)), 85 85 this, SLOT(closeTab(int))); 86 86 87 + /* Connecting the code gen button */ 88 + QObject::connect(ui->fromTree, SIGNAL(pressed()), 89 + this, SLOT(updateCurrent())); 90 + 87 91 } 88 92 89 93 void EditorWindow::setupMenus() ··· 133 137 ui->actionSave_Document->setEnabled(false); 134 138 ui->actionSave_Document_As->setEnabled(false); 135 139 ui->actionClose_Document->setEnabled(false); 140 + ui->actionToolbarSave->setEnabled(false); 141 + ui->fromTree->setEnabled(false); 136 142 } 137 143 else 138 144 { ··· 141 147 ui->actionSave_Document->setEnabled(true); 142 148 ui->actionSave_Document_As->setEnabled(true); 143 149 ui->actionClose_Document->setEnabled(true); 150 + ui->actionToolbarSave->setEnabled(true); 151 + ui->fromTree->setEnabled(true); 144 152 } 145 153 } 146 154 ··· 209 217 } 210 218 211 219 event->accept(); 220 + } 221 + 222 + void EditorWindow::updateCurrent() 223 + { 224 + if(ui->editorTabs->currentIndex() < 0) 225 + return; 226 + 227 + dynamic_cast<SkinDocument*> 228 + (ui->editorTabs->currentWidget())->genCode(); 212 229 } 213 230 214 231 EditorWindow::~EditorWindow()
+1
utils/themeeditor/editorwindow.h
··· 50 50 void saveCurrent(); 51 51 void saveCurrentAs(); 52 52 void tabTitleChanged(QString title); 53 + void updateCurrent(); /* Generates code in the current tab */ 53 54 54 55 private: 55 56 /* Setup functions */
+6
utils/themeeditor/editorwindow.ui
··· 129 129 </item> 130 130 <item> 131 131 <widget class="QPushButton" name="fromTree"> 132 + <property name="enabled"> 133 + <bool>false</bool> 134 + </property> 132 135 <property name="text"> 133 136 <string>Update Code</string> 134 137 </property> ··· 260 263 </property> 261 264 </action> 262 265 <action name="actionToolbarSave"> 266 + <property name="enabled"> 267 + <bool>false</bool> 268 + </property> 263 269 <property name="icon"> 264 270 <iconset resource="resources.qrc"> 265 271 <normaloff>:/resources/resources/document-save.png</normaloff>:/resources/resources/document-save.png</iconset>
+1
utils/themeeditor/skindocument.h
··· 41 41 42 42 ParseTreeModel* getModel(){ return model; } 43 43 QString getTitle(){ return title; } 44 + void genCode(){ editor->document()->setPlainText(model->genCode()); } 44 45 45 46 void save(); 46 47 void saveAs();