summaryrefslogtreecommitdiffstats
path: root/src/magiclabel.h
blob: 8f26d42fa450c4da920fd03f6b9055f4b971b09d (plain)
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
/***************************************************************************
 *   Copyright (C) by                                                      *
 *     - 2005: Christian Leh <moodwrod@web.de>                             *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef MAGICLABEL_H
#define MAGICLABEL_H

#include <tqstring.h>

#include <kprocess.h>

class MagicLabel : TQObject
{
  Q_OBJECT
  

  private:
    TQString prefix;
    TQString preUSER;
    TQString preCMD;

    TQString mValue;

    void transform();
    void getUserInfo();
    void getCommandOutput();

  private slots:
    void processExited(TDEProcess* proc);
    void receivedStdout(TDEProcess *proc, char *buffer, int buflen);

  public:
    MagicLabel(TQString s, bool translate);

    inline TQString& value() { return mValue; };
};

#endif