cutter/src/widgets/GraphHorizontalAdapter.h
karliss 837dd63e6b
Horizontal graph (#2234)
* Create adapter for converting vertical layout into horizontal

* Fix edge spacing override for edges going out of switch statement.

* Update documentation.
2020-06-06 02:06:38 +03:00

25 lines
736 B
C++

#ifndef GRAPH_HORIZONTAL_ADAPTER_H
#define GRAPH_HORIZONTAL_ADAPTER_H
#include "core/Cutter.h"
#include "GraphLayout.h"
/**
* @brief Adapter for converting vertical graph layout into horizontal one.
*/
class GraphHorizontalAdapter : public GraphLayout
{
public:
GraphHorizontalAdapter(std::unique_ptr<GraphLayout> layout);
virtual void CalculateLayout(GraphLayout::Graph &blocks,
ut64 entry,
int &width,
int &height) const override;
void setLayoutConfig(const LayoutConfig &config) override;
private:
std::unique_ptr<GraphLayout> layout;
void swapLayoutConfigDirection();
};
#endif // GRAPH_HORIZONTAL_ADAPTER_H