38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
84 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"));
91 QRectF
getTextDimension(
const QStringList& text,
const QFont& font,
int& line_spacing);
171 const std::array<QColor, NAMES::SIZE_OF_NAMES>
values = { { Qt::red,
174 QColor(129, 74, 25) ,
175 QColor(129, 38, 192) ,
177 QColor(129,197,122) ,
178 QColor(157,175,255) ,
182 QColor(233,222,187) ,
183 QColor(255,205,243) ,
188 template<
class COLOR_CLASS>
192 if (index >= COLOR_CLASS::NAMES::SIZE_OF_NAMES) index = index % COLOR_CLASS::NAMES::SIZE_OF_NAMES;
193 return COLOR_CLASS().values[index];
Definition: GUIHelpers.h:148
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:189
RAII class to disable the GUI and set a busy cursor and go back to the orignal state when this class ...
Definition: GUIHelpers.h:120
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)
bool was_enabled_
Definition: GUIHelpers.h:142
void unlock()
manually unlock the GUI (does nothing if already unlocked)
QWidget * locked_widget_
Definition: GUIHelpers.h:140
void lock()
manually lock the GUI (does nothing if already locked)
bool currently_locked_
Definition: GUIHelpers.h:141
GUILock(GUILock &&rhs)=delete
Given a set of levels (rows), try to add items at to topmost row which does not overlap an already pl...
Definition: GUIHelpers.h:103
std::vector< double > rows_
Definition: GUIHelpers.h:113
OverlapDetector(int levels)
C'tor: number of levels must be >=1.
size_t placeItem(double x_start, double x_end)
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
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)
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
void openURL(const QString &target)
void openFolder(const QString &folder)
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: GUIHelpers.h:151
const std::array< QColor, NAMES::SIZE_OF_NAMES > values
Definition: GUIHelpers.h:171
NAMES
Definition: GUIHelpers.h:153
@ Purple
Definition: GUIHelpers.h:158
@ DarkGrey
Definition: GUIHelpers.h:167
@ LightBlue
Definition: GUIHelpers.h:161
@ Pink
Definition: GUIHelpers.h:166
@ LightGreen
Definition: GUIHelpers.h:160
@ LightGrey
Definition: GUIHelpers.h:159
@ Orange
Definition: GUIHelpers.h:163
@ Brown
Definition: GUIHelpers.h:157
@ Cyan
Definition: GUIHelpers.h:162
@ Tan
Definition: GUIHelpers.h:165
@ Yellow
Definition: GUIHelpers.h:164
@ Green
Definition: GUIHelpers.h:156
@ Red
Definition: GUIHelpers.h:154
@ SIZE_OF_NAMES
Definition: GUIHelpers.h:168
@ Blue
Definition: GUIHelpers.h:155