WildReanimator

renderarea.h

Nov 23rd, 2012
490
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef RENDERAREA_H
  2. #define RENDERAREA_H
  3.  
  4. #include <QBrush>
  5. #include <QPen>
  6. #include <QPixmap>
  7. #include <QWidget>
  8.  
  9. #include "packager.h"
  10.  
  11. class RenderArea : public QWidget
  12. {
  13.     Q_OBJECT
  14.  
  15. public:
  16.     static const int STRIPH = 320;
  17.     static const int STRIPW = 160;
  18.     RenderArea(QWidget *parent = 0);
  19.  
  20.     QSize minimumSizeHint() const;
  21.     QSize sizeHint() const;
  22.     void setParameter(qreal param) {packager.SetParameter(param);}
  23.     void reuseAlg() {packager.UseAlgorithm();}
  24.  
  25. protected:
  26.     void paintEvent(QPaintEvent *event);
  27.  
  28. public slots:
  29.     void setAlg(int number);
  30.  
  31. private:
  32.     QPixmap pixmap;
  33.     Packager packager;
  34.     // offline
  35.     NFDH    nextFit;
  36.     FFDH    firstFit;
  37.     BFDH    bestFit;
  38.     KP01    knapsack;
  39.     SF      splitFit;
  40.     JOIN    join;
  41.     FCNR    floorCeil;
  42.     Sleator sleator;
  43.     Burke   burke;
  44.     // online
  45.     NFL   nextFitLevel;
  46.     FFL   firstFitLevel;
  47.     BFL   bestFitLevel;
  48.     BiNFL biLevel;
  49.     NFS   nextFitShelf;
  50.     FFS   firstFitShelf;
  51.     BFS   bestFitShelf;
  52.     HS    harmonicShelf;
  53.     Azar  azar;
  54.     CA    compression;
  55.     CPF   comprPartFit;
  56.     CFF   comprFullFit;
  57.     CC    comprCombo;
  58.     OF    onlineFit;
  59. };
  60.  
  61. #endif // RENDERAREA_H
RAW Paste Data