Root/
| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2006 by Massimiliano Torromeo * |
| 3 | * massimiliano.torromeo@gmail.com * |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 2 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program; if not, write to the * |
| 17 | * Free Software Foundation, Inc., * |
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 19 | ***************************************************************************/ |
| 20 | #ifndef LINKAPP_H |
| 21 | #define LINKAPP_H |
| 22 | |
| 23 | #include <string> |
| 24 | #include <iostream> |
| 25 | |
| 26 | #include "link.h" |
| 27 | |
| 28 | using std::string; |
| 29 | |
| 30 | class GMenu2X; |
| 31 | class InputManager; |
| 32 | |
| 33 | /** |
| 34 | Parses links files. |
| 35 | |
| 36 | @author Massimiliano Torromeo <massimiliano.torromeo@gmail.com> |
| 37 | */ |
| 38 | class LinkApp : public Link { |
| 39 | private: |
| 40 | InputManager &inputMgr; |
| 41 | string sclock, svolume; |
| 42 | int iclock, ivolume; |
| 43 | //G |
| 44 | string sgamma; |
| 45 | string sbacklight; |
| 46 | //G |
| 47 | int igamma; |
| 48 | int ibacklight; |
| 49 | string exec, params, workdir, manual, selectordir, selectorfilter, selectorscreens; |
| 50 | bool selectorbrowser, useRamTimings; |
| 51 | void drawRun(); |
| 52 | |
| 53 | string aliasfile; |
| 54 | string file; |
| 55 | |
| 56 | bool wrapper; |
| 57 | bool dontleave; |
| 58 | |
| 59 | public: |
| 60 | LinkApp(GMenu2X *gmenu2x, InputManager &inputMgr, const char* linkfile); |
| 61 | virtual const string &searchIcon(); |
| 62 | |
| 63 | const string &getExec(); |
| 64 | void setExec(const string &exec); |
| 65 | const string &getParams(); |
| 66 | void setParams(const string ¶ms); |
| 67 | const string &getWorkdir(); |
| 68 | void setWorkdir(const string &workdir); |
| 69 | const string &getManual(); |
| 70 | void setManual(const string &manual); |
| 71 | const string &getSelectorDir(); |
| 72 | void setSelectorDir(const string &selectordir); |
| 73 | bool getSelectorBrowser(); |
| 74 | void setSelectorBrowser(bool value); |
| 75 | bool getUseRamTimings(); |
| 76 | void setUseRamTimings(bool value); |
| 77 | const string &getSelectorScreens(); |
| 78 | void setSelectorScreens(const string &selectorscreens); |
| 79 | const string &getSelectorFilter(); |
| 80 | void setSelectorFilter(const string &selectorfilter); |
| 81 | const string &getAliasFile(); |
| 82 | void setAliasFile(const string &aliasfile); |
| 83 | |
| 84 | int clock(); |
| 85 | const string &clockStr(int maxClock); |
| 86 | void setClock(int mhz); |
| 87 | |
| 88 | int volume(); |
| 89 | const string &volumeStr(); |
| 90 | void setVolume(int vol); |
| 91 | |
| 92 | //G |
| 93 | int gamma(); |
| 94 | const string &gammaStr(); |
| 95 | void setGamma(int gamma); |
| 96 | |
| 97 | int backlight(); |
| 98 | const string &backlightStr(); |
| 99 | void setBacklight(int val); |
| 100 | // /G |
| 101 | |
| 102 | bool save(); |
| 103 | void run(); |
| 104 | void showManual(); |
| 105 | void selector(int startSelection=0, const string &selectorDir=""); |
| 106 | void launch(const string &selectedFile="", const string &selectedDir=""); |
| 107 | bool targetExists(); |
| 108 | |
| 109 | const string &getFile() { return file; } |
| 110 | void renameFile(const string &name); |
| 111 | bool &needsWrapperRef() { return wrapper; } |
| 112 | bool &runsInBackgroundRef() { return dontleave; } |
| 113 | }; |
| 114 | |
| 115 | #endif |
| 116 |
Branches:
install_locations
master
opkrun
packages
