2021-08-01 12:19:10 -03:00
|
|
|
/*
|
2021-08-09 16:28:56 -03:00
|
|
|
* Copyright (c) 2021, Tobias Christiansen <tobyase@serenityos.org>
|
2021-08-01 12:19:10 -03:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "Guide.h"
|
2021-08-31 13:09:09 -03:00
|
|
|
#include "ImageEditor.h"
|
2021-08-01 12:19:10 -03:00
|
|
|
#include <LibGUI/Dialog.h>
|
|
|
|
|
|
|
|
|
|
namespace PixelPaint {
|
|
|
|
|
|
2021-08-31 13:09:09 -03:00
|
|
|
class EditGuideDialog final : public GUI::Dialog {
|
|
|
|
|
C_OBJECT(EditGuideDialog);
|
2021-08-01 12:19:10 -03:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
String const offset() const { return m_offset; }
|
|
|
|
|
Guide::Orientation orientation() const { return m_orientation; }
|
|
|
|
|
|
2021-08-31 13:10:27 -03:00
|
|
|
Optional<float> offset_as_pixel(ImageEditor const&);
|
|
|
|
|
|
2021-08-01 12:19:10 -03:00
|
|
|
private:
|
2021-08-31 13:25:27 -03:00
|
|
|
EditGuideDialog(GUI::Window* parent_window, String const& offset = {}, Guide::Orientation orientation = Guide::Orientation::Unset);
|
2021-08-01 12:19:10 -03:00
|
|
|
|
|
|
|
|
String m_offset;
|
|
|
|
|
Guide::Orientation m_orientation;
|
|
|
|
|
|
|
|
|
|
bool m_is_horizontal_checked { false };
|
|
|
|
|
bool m_is_vertical_checked { false };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|