Permalink
Browse files

+ Load/Save settings (Config file using QSettings object)

Collect command line args in TrayItemArgs and pass to TrayItem constructor
where the dockedAppName is available to lookup app config options.
      Precedence:
	1) Command line overrides         (argSetting, if positive)
	2) User app-specific defaults     (QSettings: "<m_dockedAppName>/<key>")
	3) User global defaults           (QSettings: "GLOBAL_DEFAULTS/<key>")
	4) KDocker defaults               (#define DEFAULT_keyname)
Collect some member variables into structs to enable enum indexing.
Add context menu entries and icons.
  • Loading branch information...
Daxx committed Apr 4, 2015
1 parent 7325053 commit 537967c4229cbfffa0b63cb9ce224274ff487b68
View
Binary file not shown.
View
Binary file not shown.
View
@@ -3,8 +3,10 @@
<file>images/about.png</file>
<file>images/another.png</file>
<file>images/close.png</file>
<file>images/config.png</file>
<file>images/iconify.png</file>
<file>images/kdocker.png</file>
<file>images/options.png</file>
<file>images/question.png</file>
<file>images/restore.png</file>
</qresource>
View
@@ -44,7 +44,7 @@ Scanner::~Scanner() {
delete m_timer;
}
void Scanner::enqueue(const QString &command, const QStringList &arguments, TrayItemSettings settings, int maxTime, bool checkNormality, const QRegExp &windowName) {
void Scanner::enqueue(const QString &command, const QStringList &arguments, TrayItemArgs settings, int maxTime, bool checkNormality, const QRegExp &windowName) {
qint64 pid = 0;
bool started = true;
View
@@ -36,7 +36,7 @@ class TrayItemManager;
struct ProcessId {
QString command;
pid_t pid;
TrayItemSettings settings;
TrayItemArgs settings;
int count;
int maxCount;
bool checkNormality;
@@ -51,14 +51,14 @@ class Scanner : public QObject {
public:
Scanner(TrayItemManager *manager);
~Scanner();
void enqueue(const QString &command, const QStringList &arguments, TrayItemSettings settings, int maxTime = 30, bool checkNormality = true, const QRegExp &windowName = QRegExp());
void enqueue(const QString &command, const QStringList &arguments, TrayItemArgs settings, int maxTime = 30, bool checkNormality = true, const QRegExp &windowName = QRegExp());
bool isRunning();
private slots:
void check();
signals:
void windowFound(Window, TrayItemSettings);
void windowFound(Window, TrayItemArgs);
void stopping();
private:
Oops, something went wrong.

0 comments on commit 537967c

Please sign in to comment.