atrooney-online-2/include/aolineedit.h
Crystalwarrior 923548c997 Hellcommit of doom and suffering
Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose
Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead
Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.)
Complete overhaul of color markdowns system

TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently
2019-09-25 02:05:52 +03:00

28 lines
438 B
C++

#ifndef AOLINEEDIT_H
#define AOLINEEDIT_H
#include <QLineEdit>
#include <QMouseEvent>
class AOLineEdit : public QLineEdit
{
Q_OBJECT
public:
AOLineEdit(QWidget *parent);
void preserve_selection(bool toggle) {p_selection = toggle;}
private:
bool p_selection = false;
protected:
void mouseDoubleClickEvent(QMouseEvent *e);
void focusOutEvent(QFocusEvent *ev);
signals:
void double_clicked();
};
#endif // AOLINEEDIT_H