| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef FCVSFO_H |
| 20 |
#define FCVSFO_H 1 |
| 21 |
#include <stdio.h> |
| 22 |
#include <stdlib.h> |
| 23 |
#include <math.h> |
| 24 |
#include <cmath> |
| 25 |
#include <ctype.h> |
| 26 |
#include <string.h> |
| 27 |
#include <QtGui> |
| 28 |
#if (QT_VERSION >= 0x050000) |
| 29 |
#include <QtWidgets> |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifdef _MSC_VER |
| 33 |
#include <float.h> |
| 34 |
#define std_isnormal(arg) (_finite(arg)||(arg==0)) |
| 35 |
#else |
| 36 |
#define std_isnormal std::isnormal |
| 37 |
#endif |
| 38 |
|
| 39 |
|
| 40 |
typedef struct { |
| 41 |
int h,k,l; |
| 42 |
} Omit; |
| 43 |
|
| 44 |
|
| 45 |
struct MCell { |
| 46 |
double a,b,c,al,be,ga; |
| 47 |
double phi,V,as,bs,cs,tau,cosga,cosal,cosbe,singa,tanga; |
| 48 |
double wave; |
| 49 |
}; |
| 50 |
|
| 51 |
|
| 52 |
typedef struct { |
| 53 |
int h,k,l; |
| 54 |
double F; |
| 55 |
double phase; |
| 56 |
double sigma; |
| 57 |
double stl; |
| 58 |
double w; |
| 59 |
} Refls; |
| 60 |
|
| 61 |
|
| 62 |
class GraphSceene:public QGraphicsScene{ |
| 63 |
Q_OBJECT |
| 64 |
public: |
| 65 |
GraphSceene( qreal x, qreal y, qreal width, qreal height, QObject * parent = 0 ); |
| 66 |
QGraphicsRectItem *selEckt; |
| 67 |
QList<int> selected; |
| 68 |
QPointF selStart,selEnd; |
| 69 |
|
| 70 |
signals: |
| 71 |
void meinstatus(int da); |
| 72 |
void listen(); |
| 73 |
protected: |
| 74 |
void mouseMoveEvent ( QGraphicsSceneMouseEvent * mouseEvent ); |
| 75 |
void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ); |
| 76 |
private: |
| 77 |
}; |
| 78 |
|
| 79 |
|
| 80 |
class FcVsFo: public QDialog { |
| 81 |
Q_OBJECT |
| 82 |
public: |
| 83 |
FcVsFo(QString filename, double a,double b, double c, double al, double be, double ga, double lambda); |
| 84 |
~FcVsFo(); |
| 85 |
public slots: |
| 86 |
void delayMe(); |
| 87 |
void readFCF(); |
| 88 |
void omitref(); |
| 89 |
void st(int da); |
| 90 |
void zoomin(); |
| 91 |
void zoomout(); |
| 92 |
void zoomoff(); |
| 93 |
void zoomfit(); |
| 94 |
void selektiert(); |
| 95 |
void graphChange(int type); |
| 96 |
signals: |
| 97 |
void weg(const QString &); |
| 98 |
private: |
| 99 |
QString fileName; |
| 100 |
int listType; |
| 101 |
QGraphicsView *view; |
| 102 |
GraphSceene *scene; |
| 103 |
QList<Refls> Fc,Fo; |
| 104 |
Omit omits; |
| 105 |
double foMax,foMin,fcMax,fcMin; |
| 106 |
QLabel *state,*state2; |
| 107 |
QTextBrowser *brw; |
| 108 |
QTimer *timer; |
| 109 |
MCell cell; |
| 110 |
QGraphicsItem *diagonale; |
| 111 |
QGraphicsTextItem *txt,*txt2; |
| 112 |
}; |
| 113 |
#endif |