37 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
66 OPENMS_GUI_DLLAPI
void openFolder(
const QString& folder);
71 const QString& caption,
83 OPENMS_GUI_DLLAPI
void openURL(
const QString& target);
97 OPENMS_GUI_DLLAPI
void drawText(QPainter& painter,
const QStringList& text,
const QPoint& where,
const QColor& col_fg = QColor(
"invalid"),
const QColor& col_bg = QColor(
"invalid"),
98 const QFont& font = QFont(
"Courier"));
105 OPENMS_GUI_DLLAPI QRectF
getTextDimension(
const QStringList& text,
const QFont& font,
int& line_spacing);
109 OPENMS_GUI_DLLAPI QPointF
nearestPoint(
const QPointF& origin,
const QList<QPointF>& list);
170 bool currently_locked_{
false };
171 bool was_enabled_{
true };
203 QColor(129, 74, 25) ,
204 QColor(129, 38, 192) ,
206 QColor(129,197,122) ,
207 QColor(157,175,255) ,
211 QColor(233,222,187) ,
212 QColor(255,205,243) ,
217 template<
class COLOR_CLASS>
221 if (index >= COLOR_CLASS::NAMES::SIZE_OF_NAMES) index = index % COLOR_CLASS::NAMES::SIZE_OF_NAMES;
222 return COLOR_CLASS().values[index];
holds a vector of known file types, e.g. as a way to specify supported input formats
Definition: FileTypes.h:150
Definition: GUIHelpers.h:177
static QColor getColor(uint32_t index)
get a certain color. If index is larger than the maximum color, modulo operator will applied (cycling...
Definition: GUIHelpers.h:218
RAII class to disable the GUI and set a busy cursor and go back to the original state when this class...
Definition: GUIHelpers.h:149
GUILock & operator=(const GUILock &rhs)=delete
GUILock(const GUILock &rhs)=delete
no copy/assignment allowed
~GUILock()
D'tor: unlocks the GUI (does nothing if already unlocked)
void unlock()
manually unlock the GUI (does nothing if already unlocked)
void lock()
manually lock the GUI (does nothing if already locked)
GUILock(GUILock &&rhs)=delete
A heuristic: Given a set of levels (rows), try to add items at to topmost row which does not overlap ...
Definition: GUIHelpers.h:131
std::vector< double > rows_
store the largest x_end for each row
Definition: GUIHelpers.h:142
OverlapDetector(int levels)
size_t placeItem(double x_start, double x_end)
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void drawText(QPainter &painter, const QStringList &text, const QPoint &where, const QColor &col_fg=QColor("invalid"), const QColor &col_bg=QColor("invalid"), const QFont &font=QFont("Courier"))
draw a multi-line text at coordinates XY using a specific font and color
QString getSaveFilename(QWidget *parent, const QString &caption, const QString &dir, const FileTypeList &supported_file_types, bool add_all_filter, const FileTypes::Type fallback_extension)
Open a dialog to select a filename to save data to.
StringList convert(const QStringList &in)
QRectF getTextDimension(const QStringList &text, const QFont &font, int &line_spacing)
Obtains the bounding rectangle of a text (useful to determine overlaps etc)
void startTOPPView(const QStringList &args)
Open TOPPView (e.g. from within TOPPAS)
QPointF nearestPoint(const QPointF &origin, const QList< QPointF > &list)
Returns the point in the list that is nearest to origin.
void openURL(const QString &target)
void openFolder(const QString &folder)
QPointF intersectionPoint(const QRectF &rect, const QPointF &p)
Find the point on a rectangle where a ray/line from a point p to its center would intersect at.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48
Type
Actual file types enum.
Definition: FileTypes.h:57
Definition: GUIHelpers.h:180
const std::array< QColor, NAMES::SIZE_OF_NAMES > values
Definition: GUIHelpers.h:200
NAMES
Definition: GUIHelpers.h:182
@ Purple
Definition: GUIHelpers.h:187
@ DarkGrey
Definition: GUIHelpers.h:196
@ LightBlue
Definition: GUIHelpers.h:190
@ Pink
Definition: GUIHelpers.h:195
@ LightGreen
Definition: GUIHelpers.h:189
@ LightGrey
Definition: GUIHelpers.h:188
@ Orange
Definition: GUIHelpers.h:192
@ Brown
Definition: GUIHelpers.h:186
@ Cyan
Definition: GUIHelpers.h:191
@ Tan
Definition: GUIHelpers.h:194
@ Yellow
Definition: GUIHelpers.h:193
@ Green
Definition: GUIHelpers.h:185
@ Red
Definition: GUIHelpers.h:183
@ SIZE_OF_NAMES
Definition: GUIHelpers.h:197
@ Blue
Definition: GUIHelpers.h:184