source: SMSSender/lib/libdatatypes/src/validation/svalidationresult.h @ 71:415b45c71663

3.0
Last change on this file since 71:415b45c71663 was 71:415b45c71663, checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
  • Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
File size: 1.1 KB
Line 
1/*
2 * BCValidationResult.h
3 *
4 *  Created on: Dec 18, 2009
5 *      Author: saemy
6 */
7
8#ifndef SVALIDATIONRESULT_H_
9#define SVALIDATIONRESULT_H_
10
11#include <ivalidationresult.h>
12
13class SValidationResult: public QObject, public IValidationResult {
14    Q_OBJECT
15    Q_INTERFACES(IValidationResult)
16
17public:
18    explicit SValidationResult(const QString& message = "");
19
20    virtual void addError(const QString& message);
21    virtual void addWarning(const QString& message);
22
23    virtual ValidationType validationType() const;
24    virtual QList<QString> errors() const;
25    virtual QList<QString> warnings() const;
26
27    virtual bool           hasErrors() const;
28    virtual bool           hasWarnings() const;
29    virtual bool           isValid() const;
30
31    virtual QString        getErrorString(const QString& delimiter = "\n") const;
32    virtual QString        getWarningString(const QString& delimiter = "\n") const;
33
34protected:
35    QString                getStringFromList(const QList<QString> list, const QString& delimiter) const;
36
37private:
38    QList<QString> errors_;
39    QList<QString> warnings_;
40};
41
42#endif /* SVALIDATIONRESULT_H_ */
Note: See TracBrowser for help on using the repository browser.