aboutsummaryrefslogtreecommitdiff
blob: 44090bddfab0dc0d31db2fc1ffa53c36b591f2c7 (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
#ifndef QLISTCONVERTER_H
#define QLISTCONVERTER_H

#include "../stringlist.h"

#include <QObject>

struct StringList;

class QString;
class QStringList;

namespace CppPortage {

class QListConverter : public QObject
{
    Q_OBJECT
public:
    QListConverter(StringList *stringList, QObject *parent = 0);
    QListConverter(QStringList *stringList, QObject* parent = 0);
    virtual ~QListConverter();

    /**
    * Converts a StringList to a QStringList
    **/
    QStringList StringListToQStringList();

    /**
    * Converts a QStringList to a StringList
    **/
    StringList* QStringListToStringList();

    /**
     * This methed performs a check at the obj.If the object exists then it is dealloc.
     * We need this method,because we don't want to check "manually" if the obj exists and
     * if it exists to dealloc it with delete.
     **/
private:
    StringList *m_stringlist;
    QStringList *m_qstringlist;
};
}
#endif