most files - check if this is all we need

This commit is contained in:
2025-06-10 11:43:29 +02:00
parent 34244cacb5
commit 0fa6f49d7f
28 changed files with 9004 additions and 0 deletions

59
utils.h Normal file
View File

@ -0,0 +1,59 @@
#ifndef UTILS_H
#define UTILS_H
#include <stddef.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qtextedit.h>
#include <qevent.h>
#include <qpixmap.h>
#include <qpen.h>
#define N_SEACOLORS 138
class FlatButton: public QLabel {
Q_OBJECT
public:
FlatButton(const QString &label, QWidget *parent, const char *name=0);
signals:
void clicked();
void mousePressed();
protected:
void mousePressEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
private:
int x, y;
};
void ShrinkButton(QPushButton *b);
void SetEraseColor(QWidget *widget, QWidget *from, bool inclBgr = false);
double DoubleTime(void);
QPen thisPen(long i, int w = 0);
const QPixmap *thisPixmap(long i, int w = 0);
long Convert2ColorIndex(const QString &color);
bool Convert2ColorName(long i, QString &result);
// my own textedit, making paragraphs for newlines, but with single line spacing
class MyTextEdit: public QTextEdit {
Q_OBJECT
public:
MyTextEdit(QWidget * parent, const char *name=0);
void appendHtml(QString text);
void appendText(QString text);
void setBuffered(bool arg);
private:
bool buffered;
QString linebuffer;
QStringList buffer;
};
#endif