mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
Ajout de l'editeur d'elements
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@94 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
76
orientationset.h
Normal file
76
orientationset.h
Normal file
@@ -0,0 +1,76 @@
|
||||
#ifndef ORIENTATION_SET_H
|
||||
#define ORIENTATION_SET_H
|
||||
#include "qet.h"
|
||||
class OrientationSet {
|
||||
|
||||
// constructeurs, destructeur
|
||||
public:
|
||||
OrientationSet();
|
||||
virtual ~OrientationSet() {};
|
||||
|
||||
// attributs
|
||||
private:
|
||||
bool north_ori;
|
||||
bool east_ori;
|
||||
bool south_ori;
|
||||
bool west_ori;
|
||||
QET::Orientation default_ori;
|
||||
QET::Orientation current_ori;
|
||||
|
||||
// methodes
|
||||
public:
|
||||
bool north() const;
|
||||
bool east() const;
|
||||
bool south() const;
|
||||
bool west() const;
|
||||
bool setNorth(bool);
|
||||
bool setEast(bool);
|
||||
bool setSouth(bool);
|
||||
bool setWest(bool);
|
||||
QET::Orientation defaultOrientation() const;
|
||||
void setDefaultOrientation(const QET::Orientation &);
|
||||
QET::Orientation current() const;
|
||||
bool setCurrent(QET::Orientation);
|
||||
QET::Orientation next() const;
|
||||
QET::Orientation previous() const;
|
||||
QET::Orientation setNext();
|
||||
QET::Orientation setPrevious();
|
||||
bool accept(QET::Orientation) const;
|
||||
const OrientationSet operator++(int);
|
||||
const OrientationSet operator--(int);
|
||||
const OrientationSet operator++();
|
||||
const OrientationSet operator--();
|
||||
bool fromString(const QString &);
|
||||
QString toString() const;
|
||||
};
|
||||
|
||||
inline bool OrientationSet::north() const {
|
||||
return(north_ori);
|
||||
}
|
||||
|
||||
inline bool OrientationSet::east() const {
|
||||
return(east_ori);
|
||||
}
|
||||
|
||||
inline bool OrientationSet::south() const {
|
||||
return(south_ori);
|
||||
}
|
||||
|
||||
inline bool OrientationSet::west() const {
|
||||
return(west_ori);
|
||||
}
|
||||
|
||||
inline void OrientationSet::setDefaultOrientation(const QET::Orientation& theValue) {
|
||||
default_ori = theValue;
|
||||
|
||||
}
|
||||
|
||||
inline QET::Orientation OrientationSet::defaultOrientation() const {
|
||||
return(default_ori);
|
||||
}
|
||||
|
||||
inline QET::Orientation OrientationSet::current() const {
|
||||
return(current_ori);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user