1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
//===========================================
// Lumina Desktop Source Code
// Copyright (c) 2016, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_CONFIG_PAGE_WIDGET_FETCH_H
#define _LUMINA_CONFIG_PAGE_WIDGET_FETCH_H
#include "../globals.h"
#include "PageWidget.h"
//Simplification function for creating a PAGEINFO structure
static PAGEINFO PageInfo(QString ID, QString i_name, QString i_title, QString i_icon, QString i_comment, QString i_cat, QStringList i_sys, QStringList i_tags){
PAGEINFO page;
page.id = ID; page.name = i_name; page.title = i_title; page.icon = i_icon;
page.comment = i_comment; page.category = i_cat; page.req_systems = i_sys;
page.search_tags = i_tags;
return page;
}
//List all the known pages
// **** Add new page entries here ****
static QList<PAGEINFO> KnownPages(){
// Valid Groups: ["appearance", "interface", "session", "apps"]
QList<PAGEINFO> list;
//Reminder: <ID>, <name>, <title>, <icon>, <comment>, <category>, <server subsytem list>, <search tags>
list << PageInfo("wallpaper", QObject::tr("Change Wallpaper"), QObject::tr("Wallpaper Settings"), "preferences-desktop-wallpaper",QObject::tr("Change background image(s)"), "appearance", QStringList(), QStringList() << "background" << "wallpaper" << "color" << "image");
list << PageInfo("theme", QObject::tr("Change Desktop Theme"), QObject::tr("Theme Settings"), "preferences-desktop-theme",QObject::tr("Change interface fonts and colors"), "appearance", QStringList(), QStringList() << "background" << "interface" << "color" << "theme" << "plugins");
list << PageInfo("autostart", QObject::tr("Startup Services and Applications"), QObject::tr("Startup Settings"), "preferences-system-session-services",QObject::tr("Automatically start applications or services"), "session", QStringList(), QStringList() << "apps" << "autostart" << "services" << "xdg" << "startup" << "session");
list << PageInfo("defaultapps", QObject::tr("Default Applications for File Type"), QObject::tr("Mimetype Settings"), "preferences-desktop-filetype-association",QObject::tr("Change default applications"), "session", QStringList(), QStringList() << "apps" << "default" << "services" << "xdg" << "session");
list << PageInfo("fluxbox-keys", QObject::tr("Keyboard Shortcuts"), QObject::tr("Keyboard Shortcuts"), "preferences-desktop-keyboard",QObject::tr("Change keyboard shortcuts"), "session", QStringList(), QStringList() << "apps" << "fluxbox" << "keys" << "keyboard" << "session" << "launch");
list << PageInfo("fluxbox-settings", QObject::tr("Window Manager"), QObject::tr("Window Settings"), "preferences-system-windows",QObject::tr("Change window settings and appearances"), "appearance", QStringList(), QStringList() << "window" << "frame" << "border" << "workspace" << "theme" << "fluxbox" << "session");
return list;
}
//Add any sub-pages here
#include "page_main.h"
#include "page_wallpaper.h"
#include "page_theme.h"
#include "page_autostart.h"
#include "page_defaultapps.h"
#include "page_fluxbox_keys.h"
//#include "page_fluxbox_settings.h"
static PageWidget* GetNewPage(QString id, QWidget *parent){
//Find the page that matches this "id"
if(id=="wallpaper"){ return new page_wallpaper(parent); }
else if(id=="theme"){ return new page_theme(parent); }
else if(id=="autostart"){ return new page_autostart(parent); }
else if(id=="defaultapps"){ return new page_defaultapps(parent); }
else if(id=="fluxbox-keys"){ return new page_fluxbox_keys(parent); }
// else if(id=="fluxbox-session"){ return new page_fluxbox_settings(parent); }
//Return the main control_panel page as the fallback/default
return new page_main(parent);
}
#endif
|