text stringlengths 1 24.5M |
|---|
#pragma once
#include "GUI/button.hpp"
#include "editor/color_picker/color_picker.hpp"
#include "editor/GUI/named_container.hpp"
#include "editor/GUI/toggle.hpp"
#include "slider.hpp"
#include "common/dynamic_blur.hpp"
namespace edtr
{
struct Toolbox : public GUI::NamedContainer
{
explicit
Toolbox(sf::Vector... |
#pragma once
#include "GUI/container.hpp"
#include "GUI/button.hpp"
#include "control_state.hpp"
#include "simulation/simulation.hpp"
#include <future>
namespace edtr
{
struct ToolOption : public GUI::Button
{
trn::Transition<float> select_padding = 0.0f;
sf::Color color = sf::Color::White;
ToolOpt... |
#pragma once
#include <chrono>
#include <cmath>
namespace trn
{
template<typename T>
class Transition
{
public:
using ChronoPoint = std::chrono::steady_clock::time_point;
Transition()
: m_start_value()
, m_current_value()
, m_target_value()
, m_delta()
, m_start_time(std::chrono::steady_clock::now())
,... |
#pragma once
#include "GUI/item.hpp"
#include "render/renderer.hpp"
#include "editor/control_state.hpp"
#include "editor/time_control/time_controller.hpp"
namespace edtr
{
struct WorldView : GUI::Item
{
Simulation& simulation;
ControlState& control_state;
TimeController::State current_t... |
#pragma once
#include "editor/GUI/container.hpp"
#include "editor/GUI/button.hpp"
#include "colony_tool.hpp"
#include "simulation/simulation.hpp"
namespace edtr
{
struct ColonyCreator : public GUI::NamedContainer
{
Simulation& simulation;
ControlState& control_state;
uint32_t colonies_count = 0;
... |
#pragma once
#include "editor/GUI/named_container.hpp"
#include "common/graph.hpp"
struct ColonyChart : public GUI::Item
{
civ::Ref<Colony> colony;
ControlState& control_state;
Graphic chart;
uint32_t frame_count = 0;
SPtr<Item> chart_zone;
explicit
ColonyChart(civ::Ref<Colony> colony_, C... |
#pragma once
#include "editor/GUI/container.hpp"
#include "editor/GUI/button.hpp"
#include "editor/GUI/rounded_rectangle.hpp"
#include "editor/color_picker/color_picker.hpp"
#include "editor/control_state.hpp"
#include "common/color_utils.hpp"
#include "colony_stats.hpp"
struct ColonyTool : GUI::Container
{
civ::... |
#pragma once
#include "editor/GUI/container.hpp"
#include "common/color_utils.hpp"
namespace edtr
{
struct ColorVariation : public GUI::Item
{
sf::Color color;
sf::Color current_color;
sf::Color selected_color;
sf::VertexArray color_va;
sf::Vector2f selection;
explicit
ColorVariation(sf::... |
#pragma once
#include "editor/GUI/named_container.hpp"
#include "editor/GUI/utils.hpp"
#include "editor/control_state.hpp"
#include "editor/GUI/toggle.hpp"
struct DisplayOption : public GUI::NamedContainer
{
ControlState& control_state;
bool draw_ants = false;
bool draw_markers = false;
bool draw_... |
#pragma once
#include "editor/GUI/item.hpp"
#include "rounded_rectangle.hpp"
#include "editor/transition.hpp"
#include "text_label.hpp"
namespace GUI
{
using ButtonCallBack = std::function<void()>;
struct DefaultButton : public GUI::Item
{
ButtonCallBack click_callback = [](){};
trn::Transition<sf::Vector3... |
#pragma once
#include "editor/GUI/item.hpp"
#include "common/color_utils.hpp"
namespace GUI
{
struct AutoItemSize
{
bool valid;
float value;
};
struct Container : public Item
{
enum class Orientation
{
Horizontal,
Vertical
};
Orientation orientation;
float spacing =... |
#pragma once
namespace GUI
{
struct EmptyItem : public Item
{
EmptyItem()
{
size_type = {Size::Auto, Size::Auto};
}
// void render(sf::RenderTarget& target) override
// {
// auto r = sf::RectangleShape(size);
// r.setPosition(position);
// r.setFillColor(sf::Color::Red... |
#pragma once
#include "editor/GUI/item.hpp"
namespace GUI
{
struct GridContainer : public Item
{
sf::Vector2f cursor;
sf::Vector2f spacing;
sf::Vector2i grid_size;
sf::Vector2f items_size;
GridContainer(sf::Vector2f size_, sf::Vector2i grid_size_, sf::Vector2f position_ = {})
: Item(... |
#include "item.hpp"
float GUI::Item::SCALE = 1.0f;
|
#pragma once
#include <SFML/Graphics.hpp>
#include <common/event_manager.hpp>
#include "utils.hpp"
namespace GUI
{
enum class Alignment
{
None,
Left,
Right,
Center
};
enum class Size
{
Auto,
FitContent,
Fixed
};
struct Item;
using ItemPtr = std::shared_ptr<Item>;
struct Observer
{
... |
#pragma once
#include "container.hpp"
#include "text_label.hpp"
#include "rounded_rectangle.hpp"
#include "empty_item.hpp"
namespace GUI
{
struct NamedContainer : public Container
{
SPtr<Container> header;
SPtr<TextLabel> label;
SPtr<Container> root;
uint8_t background_intensity = 220;
bool sho... |
#pragma once
#include <SFML/Graphics.hpp>
namespace GUI
{
class RoundedRectangle : public sf::Drawable
{
public:
RoundedRectangle(float width, float height, float radius, float x, float y)
: m_width(width)
, m_height(height)
, m_radius(radius)
, m_x(x)
, m_y(y)
, m_color(sf::Color::White)
{}
R... |
#pragma once
#include "editor/GUI/item.hpp"
#include "utils.hpp"
#include <common/event_manager.hpp>
#include <vector>
namespace GUI
{
struct Scene
{
using Ptr = std::shared_ptr<Scene>;
sf::RenderWindow& window;
sfev::EventManager event_manager;
sf::Vector2f mouse_position;
Item root... |
#pragma once
#include "editor/GUI/item.hpp"
namespace GUI
{
struct TextLabel : public Item
{
std::string label;
sf::Font font;
sf::Text text;
uint32_t char_size;
bool auto_size_update = true;
Alignment alignment;
TextLabel(const std::string& label_, uint32_t char_size_, sf::Vect... |
#pragma once
#include "button.hpp"
#include "rounded_rectangle.hpp"
#include "../transition.hpp"
#include "container.hpp"
namespace GUI
{
struct Toggle : public Button
{
bool state = false;
trn::Transition<sf::Vector2f> toggle_position;
trn::Transition<sf::Vector3f> toggle_color;
sf::Vector3f color_o... |
#pragma once
#include <common/utils.hpp>
#include <SFML/Graphics.hpp>
template<typename T>
sf::Vector2f toVector2f(sf::Vector2<T> v)
{
return sf::Vector2f(to<float>(v.x), to<float>(v.y));
}
template<typename T>
T& getX(sf::Vector2<T>& v)
{
return v.x;
}
template<typename T>
T& getY(sf::Vector2<T>& v)
{
... |
#pragma once
#include "editor/tool_selector.hpp"
#include "editor/GUI/toggle.hpp"
namespace edtr
{
struct TimeController : public GUI::NamedContainer
{
enum class State
{
Play,
Pause,
};
State current_state = State::Pause;
SPtr<ToolOption> tool_pause;
SPtr<ToolOption> tool_p... |
#pragma once
#include <thread>
#include <mutex>
#include <SFML/Graphics.hpp>
#include "common/double_buffer.hpp"
struct AsyncRenderer
{
DoubleObject<sf::VertexArray>& vertex_array;
std::thread thread;
std::mutex mutex;
bool run;
bool swap_ok;
explicit
AsyncRenderer(DoubleObject<sf::VertexArray>& target)
... |
#pragma once
#include <SFML/Graphics.hpp>
#include "simulation/config.hpp"
#include "simulation/colony/colony.hpp"
#include "common/circular_gauge.hpp"
struct PopulationChart
{
float padding = 10.0f;
sf::Vector2f position;
sf::Vector2f size;
Cooldown population_update;
Graphic population;
sf::Font font;
s... |
#pragma once
#include "common/viewport_handler.hpp"
#include "common/utils.hpp"
#include "simulation/config.hpp"
#include "common/event_manager.hpp"
#include "simulation/world/world.hpp"
#include "colony_renderer.hpp"
struct Renderer
{
bool render_ants = true;
ViewportHandler vp_handler;
civ::Vector<ColonyRenderer... |
#pragma once
#include "async_va_renderer.hpp"
#include "common/grid.hpp"
#include "simulation/config.hpp"
#include "simulation/world/world_grid.hpp"
#include "common/utils.hpp"
#include <iostream>
#include "common/index_vector.hpp"
struct WorldRenderer : public AsyncRenderer
{
const Grid<WorldCell>& grid;
bool draw... |
#pragma once
#include <memory>
#include <SFML/Graphics.hpp>
template<typename T>
struct DefaultConf
{
const static sf::Color ANT_COLOR;
const static sf::Color FOOD_COLOR;
const static sf::Color TO_FOOD_COLOR;
const static sf::Color TO_HOME_COLOR;
const static sf::Color COLONY_COLOR;
const static sf::Color WALL... |
#pragma once
struct EventSate
{
bool clicking = false;
bool pause = false;
bool fullspeed = false;
};
|
#pragma once
#include "world/world.hpp"
#include "colony/colony.hpp"
#include "config.hpp"
#include "common/viewport_handler.hpp"
#include "common/event_manager.hpp"
#include "event_state.hpp"
#include "render/renderer.hpp"
#include "simulation/world/map_loader.hpp"
#include "simulation/ant/fight_system.hpp"
#include "... |
#pragma once
#include <list>
#include "simulation/world/world.hpp"
#include "simulation/config.hpp"
#include "common/direction.hpp"
#include "common/number_generator.hpp"
#include "ant_mode.hpp"
#include "common/cooldown.hpp"
#include "simulation/colony/colony_base.hpp"
#include "common/index_vector.hpp"
struct Samp... |
#pragma once
#include <cstdint>
enum class Mode : uint32_t
{
ToHome = 0,
ToFood = 1,
ToEnemy = 2,
Refill = 3,
Flee = 4,
ToHomeNoFood = 5,
Dead = 6
};
enum class FightMode
{
Fighting,
ToFight,
NoFight
};
|
#pragma once
#include "ant.hpp"
#include "simulation/world/world.hpp"
#include "soldier.hpp"
#include "worker.hpp"
struct AntUpdater
{
static void initialUpdate(Ant& ant, World& world, float dt)
{
// Generic updates
ant.updateClocks(dt);
// Update current direction
ant.direction.update(dt);
// Add ant to ... |
#include "simulation/colony/colony.hpp"
#include "common/index_vector.hpp"
struct FightSystem
{
void checkForFights(civ::Vector<Colony>& colonies, World& world)
{
for (Colony& c : colonies) {
checkForFights(c, colonies, world);
}
}
void checkForFights(Colony& colony, civ::... |
#pragma once
#include "ant.hpp"
struct SoldierUpdater
{
static void update(Ant& ant, World& world, float dt)
{
WorldCell& cell = world.map.get(ant.position);
cell.addPresence();
if (ant.direction_update.updateAutoReset(dt)) {
findMarker(ant, world);
}
}
static void findMarker(Ant& ant, World& world)
... |
#pragma once
#include "ant.hpp"
struct WorkerUpdater
{
static void findMarker(Ant& ant, World& world)
{
// Consts
constexpr float sample_angle_range = PI * 0.5f;
constexpr uint32_t sample_count = 32u;
constexpr float repellent_prob_factor = 0.3f;
// Init
SamplingResult result;
result.max_dire... |
#pragma once
#include <SFML/Graphics.hpp>
#include <vector>
#include <list>
#include "common/utils.hpp"
#include "colony_base.hpp"
#include "common/graph.hpp"
#include "common/racc.hpp"
#include "common/index_vector.hpp"
#include "simulation/ant/ant_updater.hpp"
struct Colony
{
ColonyBase base;
uint32_t ... |
#pragma once
#include <SFML/System.hpp>
#include "common/racc.hpp"
struct ColonyBase
{
sf::Vector2f position;
float radius;
float food;
float max_food = 1000.0f;
// Profiling
float food_acc;
RMean<float> food_acc_mean;
uint32_t enemies_found_count = 0;
ColonyBase()
: radius(0.0f)
, food(0.0f)
, foo... |
#include <condition_variable>
#include <atomic>
#include <mutex>
#include <thread>
#include "world.hpp"
#include "distance_field_builder.hpp"
struct AsyncDistanceFieldBuilder
{
WorldGrid& map;
std::atomic<bool> update_requested;
bool running;
std::mutex ... |
#pragma once
#include "world_grid.hpp"
struct DistanceFieldBuilder
{
static void computeDistance(WorldGrid& grid)
{
for (int32_t x(0); x < grid.width; ++x) {
for (int32_t y(0); y < grid.height; ++y) {
WorldCell& cell = grid.get(sf::Vector2i(x, y));
if (cell.wall) {
cell.wall_dist = getMinDist(x, y... |
#pragma once
#include "world.hpp"
#include "distance_field_builder.hpp"
#include <SFML/Graphics.hpp>
#include <iostream>
struct MapLoader
{
static void loadMap(World& world, const std::string& map_filename)
{
constexpr uint8_t wall_0_value = 100;
constexpr uint8_t food_0_value = 100;
sf::Image foo... |
#pragma once
#include <SFML/System/Vector2.hpp>
struct Wall
{
sf::Vector2f position;
}; |
#pragma once
#include <SFML/System.hpp>
#include "world_grid.hpp"
#include "common/utils.hpp"
#include "wall.hpp"
#include "common/grid.hpp"
#include "simulation/ant/ant_mode.hpp"
#include "render/world_renderer.hpp"
struct World
{
sf::Vector2f size;
WorldGrid map;
DoubleObject<sf::VertexArray> va_map;
WorldRend... |
#pragma once
#include <vector>
#include "simulation/ant/ant_mode.hpp"
#include "simulation/config.hpp"
#include "common/utils.hpp"
#include "common/grid.hpp"
constexpr float min_intensity = 0.1f;
struct AntRef
{
bool active = false;
uint8_t col_id = 0;
uint16_t ant_id = 0;
};
struct ColonyCell
{
// Stor... |
#include <SFML/Graphics.hpp>
#include <list>
#include <fstream>
#include "simulation/config.hpp"
#include "simulation/world/distance_field_builder.hpp"
#include "simulation/simulation.hpp"
#include "editor/editor_scene.hpp"
int main()
{
// Load configuration
if (Conf::loadUserConf()) {
std::cout << "C... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software")... |
/*********************************************************************
*
* Copyright 2011 Jose Fonseca
* Copyright 2012 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software... |
/*********************************************************************
*
* Copyright 2011 Jose Fonseca
* Copyright 2012 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software... |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software")... |
/*********************************************************************
*
* Copyright 2016 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/**************************************************************************
*
* Copyright 2011 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Jose Fonseca
* Copyright 2012 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software... |
/*********************************************************************
*
* Copyright 2011 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
... |
/**************************************************************************
*
* Copyright 2013 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/*********************************************************************
*
* Copyright 2011 Intel Corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software wit... |
/**************************************************************************
*
* Copyright 2010 VMware, Inc.
* Copyright 2011 Intel corporation
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwa... |
/**************************************************************************
*
* Copyright 2012 Jose Fonseca
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2016 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2008-2009 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Softwar... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2011 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2016 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2011 LunarG, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/**************************************************************************
*
* Copyright 2010 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2023 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
/*********************************************************************
*
* Copyright 2020 Collabora Ltd
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without... |
#include "adaptivedoublespinbox.h"
#include <cmath>
AdaptiveDoubleSpinBox::AdaptiveDoubleSpinBox(QWidget *parent)
: QDoubleSpinBox(parent)
{
}
void AdaptiveDoubleSpinBox::stepBy(int steps)
{
const double oldValue = value();
const double oldAbsValue = qAbs(oldValue);
const double oldStep = std::pow(10... |
#pragma once
#include <QDoubleSpinBox>
class AdaptiveDoubleSpinBox : public QDoubleSpinBox
{
Q_OBJECT
public:
explicit AdaptiveDoubleSpinBox(QWidget *parent = nullptr);
virtual void stepBy(int steps) override;
};
|
#include "apicalldelegate.h"
#include "apitracecall.h"
#include "apitracemodel.h"
#include "thumbnail.h"
#include <QApplication>
#include <QDebug>
#include <QPainter>
#include <QStaticText>
#include <QStyle>
ApiCallDelegate::ApiCallDelegate(QWidget *parent)
: QStyledItemDelegate(parent),
m_stateEmblem(":/r... |
#pragma once
#include <QStyledItemDelegate>
class ApiCallDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
ApiCallDelegate(QWidget *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const override;
QSize sizeHint(const QSty... |
#include "apisurface.h"
#include "thumbnail.h"
#include <algorithm>
#include <sstream>
#include <memory>
#include <QDebug>
#include <QSysInfo>
#include "image.hpp"
ApiSurface::ApiSurface()
{
}
QSize ApiSurface::size() const
{
return m_size;
}
void ApiSurface::setSize(const QSize &size)
{
m_size = size;
}... |
#pragma once
#include <QImage>
#include <QSize>
#include <QString>
namespace image {
class Image;
}
class ApiSurface
{
public:
ApiSurface();
QSize size() const;
void setSize(const QSize &size);
int depth() const;
void setDepth(int depth);
QString formatName() const;
void setFormatN... |
#include "apitrace.h"
#include "traceloader.h"
#include "saverthread.h"
#include <QDebug>
#include <QFileInfo>
#include <QDir>
#include <QThread>
ApiTrace::ApiTrace()
: m_needsSaving(false)
{
m_loader = new TraceLoader();
connect(this, SIGNAL(loadTrace(QString)),
m_loader, SLOT(loadTrace(QSt... |
#pragma once
#include "apitracecall.h"
#include "trace_api.hpp"
#include <QObject>
#include <QSet>
class TraceLoader;
class SaverThread;
class QThread;
typedef void (*ThumbnailCallback)(void *object, int thumbnailIdx);
typedef QHash<int, QImage> ImageHash;
class ApiTrace : public QObject
{
Q_OBJECT
public:
... |
#include "apitracecall.h"
#include "apitrace.h"
#include "traceloader.h"
#include "trace_model.hpp"
#include <QDebug>
#include <QLocale>
#include <QObject>
#define QT_USE_FAST_OPERATOR_PLUS
#include <QStringBuilder>
#include <QTextDocument>
#include <QRegularExpression>
const char * const styleSheet =
".call {\n... |
#pragma once
#include "apisurface.h"
#include <QStaticText>
#include <QStringList>
#include <QUrl>
#include <QVariant>
#include "trace_model.hpp"
class ApiTrace;
class TraceLoader;
class VariantVisitor : public trace::Visitor
{
public:
virtual void visit(trace::Null *) override;
virtual void visit(trace::... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.