mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Standalone overlay editor
This commit is contained in:
parent
1e6b573e36
commit
2ee79f24a2
File diff suppressed because it is too large
Load Diff
@ -36,10 +36,192 @@
|
||||
#include "ClientUser.h"
|
||||
#include "SharedMemory.h"
|
||||
#include "ui_Overlay.h"
|
||||
#include "ui_OverlayEditor.h"
|
||||
|
||||
class User;
|
||||
class Overlay;
|
||||
|
||||
class OverlayGroup : public QGraphicsItem {
|
||||
private:
|
||||
Q_DISABLE_COPY(OverlayGroup);
|
||||
public:
|
||||
enum { Type = UserType + 5 };
|
||||
public:
|
||||
OverlayGroup();
|
||||
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
|
||||
int type() const;
|
||||
};
|
||||
|
||||
class OverlayUser : public OverlayGroup {
|
||||
private:
|
||||
Q_DISABLE_COPY(OverlayUser);
|
||||
public:
|
||||
enum { Type = UserType + 1 };
|
||||
protected:
|
||||
QGraphicsPixmapItem *qgpiMuted, *qgpiDeafened;
|
||||
QGraphicsPixmapItem *qgpiAvatar;
|
||||
QGraphicsPixmapItem *qgpiName[4];
|
||||
QGraphicsPixmapItem *qgpiChannel;
|
||||
QGraphicsPathItem *qgpiBox;
|
||||
|
||||
unsigned int uiSize;
|
||||
ClientUser *cuUser;
|
||||
Settings::TalkState tsColor;
|
||||
|
||||
QString qsName;
|
||||
QString qsChannelName;
|
||||
QByteArray qbaAvatar;
|
||||
|
||||
void setup();
|
||||
|
||||
public:
|
||||
OverlayUser(ClientUser *cu, unsigned int uiSize);
|
||||
OverlayUser(Settings::TalkState ts, unsigned int uiSize);
|
||||
void updateUser();
|
||||
void updateLayout();
|
||||
|
||||
int type() const;
|
||||
|
||||
static QPixmap createPixmap(const QString &str, unsigned int height, unsigned int maxwidth, QColor col, const QFont &font, QPainterPath &);
|
||||
static QRectF scaledRect(const QRectF &qr, qreal scale);
|
||||
static QPointF alignedPosition(const QRectF &box, const QRectF &item, Qt::Alignment a);
|
||||
};
|
||||
|
||||
/*
|
||||
class OverlayEditUser : public QObject, public OverlayUser {
|
||||
private:
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(OverlayEditUser);
|
||||
public:
|
||||
enum { Type = UserType + 2 };
|
||||
protected:
|
||||
QGraphicsRectItem *qgriSelected;
|
||||
QGraphicsPixmapItem *qgpiSelected;
|
||||
int iDragCorner;
|
||||
|
||||
Qt::WindowFrameSection wfsHover;
|
||||
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
void focusInEvent(QFocusEvent *);
|
||||
void focusOutEvent(QFocusEvent *);
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *);
|
||||
void updateCursorShape(const QPointF &point);
|
||||
|
||||
QGraphicsPixmapItem *childAt(const QPointF &);
|
||||
QRectF selectedRect() const;
|
||||
|
||||
static Qt::WindowFrameSection rectSection(const QRectF &rect, const QPointF &point, qreal dist = 3.0f);
|
||||
public:
|
||||
OverlayEditUser(Settings::TalkState ts, unsigned int uiSize);
|
||||
|
||||
QRectF boundingRect() const;
|
||||
int type() const;
|
||||
};
|
||||
*/
|
||||
|
||||
class OverlayUserGroup : public OverlayGroup {
|
||||
private:
|
||||
Q_DISABLE_COPY(OverlayUserGroup);
|
||||
public:
|
||||
enum { Type = UserType + 3 };
|
||||
protected:
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
|
||||
void wheelEvent(QGraphicsSceneWheelEvent *);
|
||||
public:
|
||||
OverlayUserGroup();
|
||||
int type() const;
|
||||
};
|
||||
|
||||
class OverlayEditorScene : public QGraphicsScene {
|
||||
private:
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(OverlayEditorScene)
|
||||
protected:
|
||||
QGraphicsItem *qgiGroup;
|
||||
|
||||
QGraphicsPixmapItem *qgpiMuted;
|
||||
QGraphicsPixmapItem *qgpiAvatar;
|
||||
QGraphicsPixmapItem *qgpiName;
|
||||
QGraphicsPixmapItem *qgpiChannel;
|
||||
QGraphicsPathItem *qgpiBox;
|
||||
QGraphicsRectItem *qgriSelected;
|
||||
QGraphicsPixmapItem *qgpiSelected;
|
||||
int iDragCorner;
|
||||
|
||||
Qt::WindowFrameSection wfsHover;
|
||||
|
||||
unsigned int uiSize;
|
||||
|
||||
void setup();
|
||||
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
void updateCursorShape(const QPointF &point);
|
||||
|
||||
QGraphicsPixmapItem *childAt(const QPointF &);
|
||||
QRectF selectedRect() const;
|
||||
|
||||
static Qt::WindowFrameSection rectSection(const QRectF &rect, const QPointF &point, qreal dist = 3.0f);
|
||||
public:
|
||||
Settings::TalkState tsColor;
|
||||
OverlaySettings os;
|
||||
|
||||
OverlayEditorScene(QObject *p = NULL);
|
||||
|
||||
public slots:
|
||||
void resync();
|
||||
void updateSelected();
|
||||
|
||||
void updateMuted();
|
||||
void updateUserName();
|
||||
void updateChannel();
|
||||
void updateAvatar();
|
||||
|
||||
void moveMuted();
|
||||
void moveUserName();
|
||||
void moveChannel();
|
||||
void moveAvatar();
|
||||
void moveBox();
|
||||
};
|
||||
|
||||
class OverlayEditor : public QDialog, public Ui::OverlayEditor {
|
||||
private:
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(OverlayEditor)
|
||||
protected:
|
||||
QGraphicsItem *qgiPromote;
|
||||
OverlayEditorScene oes;
|
||||
|
||||
void enterEvent(QEvent *);
|
||||
void leaveEvent(QEvent *);
|
||||
public:
|
||||
OverlayEditor(QWidget *p = NULL, QGraphicsItem *qgi = NULL);
|
||||
~OverlayEditor();
|
||||
public slots:
|
||||
void reset();
|
||||
void apply();
|
||||
void accept();
|
||||
|
||||
void on_qrbPassive_clicked();
|
||||
void on_qrbTalking_clicked();
|
||||
void on_qrbWhisper_clicked();
|
||||
void on_qrbShout_clicked();
|
||||
|
||||
void on_qcbAvatar_clicked();
|
||||
void on_qcbUser_clicked();
|
||||
void on_qcbChannel_clicked();
|
||||
void on_qcbMutedDeafened_clicked();
|
||||
void on_qcbBox_clicked();
|
||||
};
|
||||
|
||||
class OverlayConfig : public ConfigWidget, public Ui::OverlayConfig {
|
||||
private:
|
||||
Q_OBJECT
|
||||
@ -79,66 +261,6 @@ struct OverlayTextLine {
|
||||
bool operator <(const OverlayTextLine &o) const;
|
||||
};
|
||||
|
||||
class OverlayUser : public QObject, public QGraphicsItem {
|
||||
private:
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(OverlayUser);
|
||||
public:
|
||||
enum { Type = UserType + 1 };
|
||||
protected:
|
||||
QGraphicsPixmapItem *qgpiMuted, *qgpiDeafened;
|
||||
QGraphicsPixmapItem *qgpiAvatar;
|
||||
QGraphicsPixmapItem *qgpiName[4];
|
||||
QGraphicsPixmapItem *qgpiChannel;
|
||||
QGraphicsPathItem *qgpiBox;
|
||||
|
||||
QGraphicsRectItem *qgriActive;
|
||||
QGraphicsRectItem *qgriSelected;
|
||||
QGraphicsPixmapItem *qgpiSelected;
|
||||
int iDragCorner;
|
||||
|
||||
unsigned int uiSize;
|
||||
ClientUser *cuUser;
|
||||
Settings::TalkState tsColor;
|
||||
|
||||
QString qsName;
|
||||
QString qsChannelName;
|
||||
QByteArray qbaAvatar;
|
||||
|
||||
Qt::WindowFrameSection wfsHover;
|
||||
|
||||
void setup();
|
||||
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
void focusInEvent(QFocusEvent *);
|
||||
void focusOutEvent(QFocusEvent *);
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *);
|
||||
void wheelEvent(QGraphicsSceneWheelEvent *);
|
||||
void updateCursorShape(const QPointF &point);
|
||||
|
||||
QGraphicsPixmapItem *childAt(const QPointF &);
|
||||
QRectF selectedRect() const;
|
||||
|
||||
static Qt::WindowFrameSection rectSection(const QRectF &rect, const QPointF &point, qreal dist = 3.0f);
|
||||
static QRectF scaledRect(const QRectF &qr, qreal scale);
|
||||
static QPointF alignedPosition(const QRectF &box, const QRectF &item, Qt::Alignment a);
|
||||
public:
|
||||
OverlayUser(ClientUser *cu, unsigned int uiSize);
|
||||
OverlayUser(Settings::TalkState ts, unsigned int uiSize);
|
||||
void updateUser();
|
||||
void updateLayout();
|
||||
|
||||
int type() const;
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
|
||||
|
||||
static QPixmap createPixmap(const QString &str, unsigned int height, unsigned int maxwidth, QColor col, const QFont &font, QPainterPath &);
|
||||
};
|
||||
|
||||
class OverlayMouse : public QGraphicsPixmapItem {
|
||||
private:
|
||||
Q_DISABLE_COPY(OverlayMouse);
|
||||
@ -166,6 +288,7 @@ class OverlayClient : public QObject {
|
||||
|
||||
quint64 uiPid;
|
||||
QGraphicsScene qgs;
|
||||
OverlayUserGroup ougUsers;
|
||||
QMap<QObject *, OverlayUser *> qmUsers;
|
||||
QList<OverlayUser *> qlExampleUsers;
|
||||
|
||||
@ -197,6 +320,7 @@ class OverlayClient : public QObject {
|
||||
void hideGui();
|
||||
void scheduleDelete();
|
||||
void updateMouse();
|
||||
void openEditor();
|
||||
};
|
||||
|
||||
class OverlayPrivate : public QObject {
|
||||
|
||||
233
src/mumble/OverlayEditor.ui
Normal file
233
src/mumble/OverlayEditor.ui
Normal file
@ -0,0 +1,233 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OverlayEditor</class>
|
||||
<widget class="QDialog" name="OverlayEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>718</width>
|
||||
<height>556</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="qgbState">
|
||||
<property name="title">
|
||||
<string>State</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="qrbPassive">
|
||||
<property name="toolTip">
|
||||
<string>User is not talking</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Passive</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="qrbTalking">
|
||||
<property name="toolTip">
|
||||
<string>User is talking in your channel or a linked channel</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Talking</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="qrbWhisper">
|
||||
<property name="toolTip">
|
||||
<string>User is whispering to you privately</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Private Whisper</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="qrbShout">
|
||||
<property name="toolTip">
|
||||
<string>User is shouting to your channel</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel Whisper</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QGraphicsView" name="qgvView">
|
||||
<property name="interactive">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="renderHints">
|
||||
<set>QPainter::Antialiasing|QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="qgbZoom">
|
||||
<property name="title">
|
||||
<string>Zoom</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QSlider" name="qsZoom">
|
||||
<property name="toolTip">
|
||||
<string>Zoom Factor</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksBelow</enum>
|
||||
</property>
|
||||
<property name="tickInterval">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="qgbElements">
|
||||
<property name="title">
|
||||
<string>Enabled Elements</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="qcbAvatar">
|
||||
<property name="toolTip">
|
||||
<string>User avatar, chosen by each user</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Avatar</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="qcbUser">
|
||||
<property name="toolTip">
|
||||
<string>User's name</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="qcbChannel">
|
||||
<property name="toolTip">
|
||||
<string>Name of user's channel, if outside your current channel</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="qcbMutedDeafened">
|
||||
<property name="toolTip">
|
||||
<string>Muted or deafened</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mute state</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="qcbBox">
|
||||
<property name="toolTip">
|
||||
<string>Bounding box, automatically shrunk to minimum size to contain all visible elements</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bounding box</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="qdbbBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>qrbPassive</tabstop>
|
||||
<tabstop>qrbTalking</tabstop>
|
||||
<tabstop>qrbWhisper</tabstop>
|
||||
<tabstop>qrbShout</tabstop>
|
||||
<tabstop>qcbAvatar</tabstop>
|
||||
<tabstop>qcbUser</tabstop>
|
||||
<tabstop>qcbChannel</tabstop>
|
||||
<tabstop>qcbMutedDeafened</tabstop>
|
||||
<tabstop>qcbBox</tabstop>
|
||||
<tabstop>qsZoom</tabstop>
|
||||
<tabstop>qgvView</tabstop>
|
||||
<tabstop>qdbbBox</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>qdbbBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>OverlayEditor</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>227</x>
|
||||
<y>538</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>qdbbBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>OverlayEditor</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>295</x>
|
||||
<y>544</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@ -203,8 +203,6 @@ Settings::Settings() {
|
||||
bOverlayEnable = true;
|
||||
osOverlay = All;
|
||||
bOverlayAlwaysSelf = true;
|
||||
fOverlayX = 0.8f;
|
||||
fOverlayY = 0.0f;
|
||||
bOverlayTop = false;
|
||||
bOverlayBottom = true;
|
||||
bOverlayLeft = true;
|
||||
@ -217,57 +215,60 @@ Settings::Settings() {
|
||||
qcOverlayUser = QColor(255,255,255,128);
|
||||
qcOverlayTalking = QColor(255,255,196,255);
|
||||
qcOverlayWhisper = QColor(255,128,128,255);
|
||||
qcOverlayChannel = QColor(192,192,255,192);
|
||||
qcOverlayChannelTalking = QColor(224,224,255,255);
|
||||
|
||||
fOverlayHeight = .1f;
|
||||
os.fOverlayX = 0.8f;
|
||||
os.fOverlayY = 0.0f;
|
||||
os.fOverlayHeight = 1.f;
|
||||
|
||||
qcOverlayUserName[Passive] = QColor(128, 128, 128);
|
||||
qcOverlayUserName[Talking] = QColor(255, 255, 255);
|
||||
qcOverlayUserName[WhisperPrivate] = QColor(128, 255, 128);
|
||||
qcOverlayUserName[WhisperChannel] = QColor(255, 128, 255);
|
||||
os.qcOverlayUserName[Passive] = QColor(128, 128, 128);
|
||||
os.qcOverlayUserName[Talking] = QColor(255, 255, 255);
|
||||
os.qcOverlayUserName[WhisperPrivate] = QColor(128, 255, 128);
|
||||
os.qcOverlayUserName[WhisperChannel] = QColor(255, 128, 255);
|
||||
os.qcOverlayChannel = QColor(192,192,255,192);
|
||||
|
||||
fOverlayUserName = 0.75f;
|
||||
|
||||
os.fOverlayUserName = 0.75f;
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
qfOverlayUserName = QFont(QLatin1String("Verdana"), 20);
|
||||
os.qfOverlayUserName = QFont(QLatin1String("Verdana"), 20);
|
||||
#else
|
||||
qfOverlayUserName = QFont(QLatin1String("Arial"), 20);
|
||||
os.qfOverlayUserName = QFont(QLatin1String("Arial"), 20);
|
||||
#endif
|
||||
|
||||
qcOverlayChannel = QColor(255, 255, 128);
|
||||
fOverlayChannel = 0.75f;
|
||||
qfOverlayChannel = qfOverlayUserName;
|
||||
os.qcOverlayChannel = QColor(255, 255, 128);
|
||||
os.fOverlayChannel = 0.75f;
|
||||
os.qfOverlayChannel = os.qfOverlayUserName;
|
||||
|
||||
fOverlayMutedDeafened = 0.5f;
|
||||
fOverlayAvatar = 1.0f;
|
||||
os.fOverlayMutedDeafened = 0.5f;
|
||||
os.fOverlayAvatar = 1.0f;
|
||||
|
||||
qcOverlayBoxPen = QColor(0, 0, 0, 224);
|
||||
qcOverlayBoxFill = QColor(128, 128, 128, 128);
|
||||
fOverlayBoxPenWidth = (1.f / 256.0f);
|
||||
fOverlayBoxPad = (1.f / 256.0f);
|
||||
os.qcOverlayBoxPen = QColor(0, 0, 0, 224);
|
||||
os.qcOverlayBoxFill = QColor(128, 128, 128, 128);
|
||||
os.fOverlayBoxPenWidth = (1.f / 256.0f);
|
||||
os.fOverlayBoxPad = (1.f / 256.0f);
|
||||
|
||||
fOverlayUser[Passive] = 0.5f;
|
||||
fOverlayUser[Talking] = (7.0f / 8.0f);
|
||||
fOverlayUser[WhisperPrivate] = (7.0f / 8.0f);
|
||||
fOverlayUser[WhisperChannel] = (7.0f / 8.0f);
|
||||
os.fOverlayUser[Passive] = 0.5f;
|
||||
os.fOverlayUser[Talking] = (7.0f / 8.0f);
|
||||
os.fOverlayUser[WhisperPrivate] = (7.0f / 8.0f);
|
||||
os.fOverlayUser[WhisperChannel] = (7.0f / 8.0f);
|
||||
|
||||
// Nice and exact float values.
|
||||
|
||||
qrfOverlayUserName = QRectF(0.0f, 0.101563f, 0.125f, 0.023438f);
|
||||
qrfOverlayChannel = QRectF(0.03125f, 0.0f, 0.09375f, 0.015625f);
|
||||
qrfOverlayMutedDeafened = QRectF(0.0f, 0.0f, 0.0625f, 0.0625f);
|
||||
qrfOverlayAvatar = QRectF(0.0f, 0.0f, 0.125f, 0.125f);
|
||||
os.qrfOverlayUserName = QRectF(0.0f, 0.101563f, 0.125f, 0.023438f);
|
||||
os.qrfOverlayChannel = QRectF(0.03125f, 0.0f, 0.09375f, 0.015625f);
|
||||
os.qrfOverlayMutedDeafened = QRectF(0.0f, 0.0f, 0.0625f, 0.0625f);
|
||||
os.qrfOverlayAvatar = QRectF(0.0f, 0.0f, 0.125f, 0.125f);
|
||||
|
||||
bOverlayUserName = true;
|
||||
bOverlayChannel = true;
|
||||
bOverlayMutedDeafened = true;
|
||||
bOverlayAvatar = true;
|
||||
bOverlayBox = false;
|
||||
os.bOverlayUserName = true;
|
||||
os.bOverlayChannel = true;
|
||||
os.bOverlayMutedDeafened = true;
|
||||
os.bOverlayAvatar = true;
|
||||
os.bOverlayBox = false;
|
||||
|
||||
qaOverlayUserName = Qt::AlignCenter;
|
||||
qaOverlayMutedDeafened = Qt::AlignLeft | Qt::AlignTop;
|
||||
qaOverlayAvatar = Qt::AlignCenter;
|
||||
qaOverlayChannel = Qt::AlignCenter;
|
||||
os.qaOverlayUserName = Qt::AlignCenter;
|
||||
os.qaOverlayMutedDeafened = Qt::AlignLeft | Qt::AlignTop;
|
||||
os.qaOverlayAvatar = Qt::AlignCenter;
|
||||
os.qaOverlayChannel = Qt::AlignCenter;
|
||||
|
||||
iLCDUserViewMinColWidth = 50;
|
||||
iLCDUserViewSplitterWidth = 2;
|
||||
@ -431,6 +432,7 @@ void Settings::load() {
|
||||
SAVELOAD(iTTSThreshold, "tts/threshold");
|
||||
|
||||
SAVELOAD(bOverlayEnable, "overlay/enable");
|
||||
/*
|
||||
LOADENUM(osOverlay, "overlay/show");
|
||||
SAVELOAD(bOverlayAlwaysSelf, "overlay/alwaysself");
|
||||
SAVELOAD(fOverlayX, "overlay/x");
|
||||
@ -446,6 +448,7 @@ void Settings::load() {
|
||||
SAVELOAD(qcOverlayTalking, "overlay/talking");
|
||||
SAVELOAD(qcOverlayChannel, "overlay/channel");
|
||||
SAVELOAD(qcOverlayChannelTalking, "overlay/channeltalking");
|
||||
*/
|
||||
|
||||
// Network settings
|
||||
SAVELOAD(bTCPCompat, "net/tcponly");
|
||||
@ -620,6 +623,7 @@ void Settings::save() {
|
||||
SAVELOAD(iTTSThreshold, "tts/threshold");
|
||||
|
||||
SAVELOAD(bOverlayEnable, "overlay/enable");
|
||||
/*
|
||||
SAVELOAD(osOverlay, "overlay/show");
|
||||
SAVELOAD(bOverlayAlwaysSelf, "overlay/alwaysself");
|
||||
SAVELOAD(fOverlayX, "overlay/x");
|
||||
@ -635,6 +639,7 @@ void Settings::save() {
|
||||
SAVELOAD(qcOverlayTalking, "overlay/talking");
|
||||
SAVELOAD(qcOverlayChannel, "overlay/channel");
|
||||
SAVELOAD(qcOverlayChannelTalking, "overlay/channeltalking");
|
||||
*/
|
||||
|
||||
// Network settings
|
||||
SAVELOAD(bTCPCompat, "net/tcponly");
|
||||
|
||||
@ -73,6 +73,46 @@ QDataStream &operator<<(QDataStream &, const ShortcutTarget &);
|
||||
QDataStream &operator>>(QDataStream &, ShortcutTarget &);
|
||||
Q_DECLARE_METATYPE(ShortcutTarget);
|
||||
|
||||
struct OverlaySettings {
|
||||
float fOverlayX;
|
||||
float fOverlayY;
|
||||
|
||||
qreal fOverlayHeight;
|
||||
|
||||
QColor qcOverlayUserName[4];
|
||||
QFont qfOverlayUserName;
|
||||
|
||||
QColor qcOverlayChannel;
|
||||
QFont qfOverlayChannel;
|
||||
|
||||
qreal fOverlayBoxPad;
|
||||
qreal fOverlayBoxPenWidth;
|
||||
QColor qcOverlayBoxPen;
|
||||
QColor qcOverlayBoxFill;
|
||||
|
||||
bool bOverlayUserName;
|
||||
bool bOverlayChannel;
|
||||
bool bOverlayMutedDeafened;
|
||||
bool bOverlayAvatar;
|
||||
bool bOverlayBox;
|
||||
|
||||
qreal fOverlayUserName;
|
||||
qreal fOverlayChannel;
|
||||
qreal fOverlayMutedDeafened;
|
||||
qreal fOverlayAvatar;
|
||||
qreal fOverlayUser[4];
|
||||
|
||||
QRectF qrfOverlayUserName;
|
||||
QRectF qrfOverlayChannel;
|
||||
QRectF qrfOverlayMutedDeafened;
|
||||
QRectF qrfOverlayAvatar;
|
||||
|
||||
Qt::Alignment qaOverlayUserName;
|
||||
Qt::Alignment qaOverlayChannel;
|
||||
Qt::Alignment qaOverlayMutedDeafened;
|
||||
Qt::Alignment qaOverlayAvatar;
|
||||
};
|
||||
|
||||
struct Settings {
|
||||
enum AudioTransmit { Continous, VAD, PushToTalk };
|
||||
enum VADSource { Amplitude, SignalToNoise };
|
||||
@ -135,49 +175,14 @@ struct Settings {
|
||||
bool bOverlayEnable;
|
||||
OverlayShow osOverlay;
|
||||
bool bOverlayAlwaysSelf;
|
||||
float fOverlayX;
|
||||
float fOverlayY;
|
||||
bool bOverlayLeft, bOverlayRight, bOverlayTop, bOverlayBottom;
|
||||
QFont qfOverlayFont;
|
||||
QColor qcOverlayUser;
|
||||
QColor qcOverlayTalking;
|
||||
QColor qcOverlayWhisper;
|
||||
QColor qcOverlayChannelTalking;
|
||||
|
||||
qreal fOverlayHeight;
|
||||
|
||||
QColor qcOverlayUserName[4];
|
||||
QFont qfOverlayUserName;
|
||||
|
||||
QColor qcOverlayChannel;
|
||||
QFont qfOverlayChannel;
|
||||
|
||||
qreal fOverlayBoxPad;
|
||||
qreal fOverlayBoxPenWidth;
|
||||
QColor qcOverlayBoxPen;
|
||||
QColor qcOverlayBoxFill;
|
||||
|
||||
bool bOverlayUserName;
|
||||
bool bOverlayChannel;
|
||||
bool bOverlayMutedDeafened;
|
||||
bool bOverlayAvatar;
|
||||
bool bOverlayBox;
|
||||
|
||||
qreal fOverlayUserName;
|
||||
qreal fOverlayChannel;
|
||||
qreal fOverlayMutedDeafened;
|
||||
qreal fOverlayAvatar;
|
||||
qreal fOverlayUser[4];
|
||||
|
||||
QRectF qrfOverlayUserName;
|
||||
QRectF qrfOverlayChannel;
|
||||
QRectF qrfOverlayMutedDeafened;
|
||||
QRectF qrfOverlayAvatar;
|
||||
|
||||
Qt::Alignment qaOverlayUserName;
|
||||
Qt::Alignment qaOverlayChannel;
|
||||
Qt::Alignment qaOverlayMutedDeafened;
|
||||
Qt::Alignment qaOverlayAvatar;
|
||||
OverlaySettings os;
|
||||
|
||||
int iLCDUserViewMinColWidth;
|
||||
int iLCDUserViewSplitterWidth;
|
||||
|
||||
@ -9,7 +9,7 @@ SOURCES *= BanEditor.cpp ACLEditor.cpp ConfigWidget.cpp Log.cpp AudioConfigDial
|
||||
SOURCES *= smallft.cpp
|
||||
DIST *= ../../icons/mumble.ico licenses.h smallft.h ../../icons/mumble.xpm murmur_pch.h mumble.plist
|
||||
RESOURCES *= mumble.qrc mumble_flags.qrc
|
||||
FORMS *= ConfigDialog.ui MainWindow.ui ConnectDialog.ui ConnectDialogEdit.ui BanEditor.ui ACLEditor.ui Plugins.ui Overlay.ui LookConfig.ui AudioInput.ui AudioOutput.ui Log.ui TextMessage.ui AudioStats.ui NetworkConfig.ui LCD.ui GlobalShortcut.ui GlobalShortcutTarget.ui Cert.ui UserEdit.ui AudioWizard.ui Tokens.ui RichTextEditor.ui RichTextEditorLink.ui UserInformation.ui
|
||||
FORMS *= ConfigDialog.ui MainWindow.ui ConnectDialog.ui ConnectDialogEdit.ui BanEditor.ui ACLEditor.ui Plugins.ui Overlay.ui OverlayEditor.ui LookConfig.ui AudioInput.ui AudioOutput.ui Log.ui TextMessage.ui AudioStats.ui NetworkConfig.ui LCD.ui GlobalShortcut.ui GlobalShortcutTarget.ui Cert.ui UserEdit.ui AudioWizard.ui Tokens.ui RichTextEditor.ui RichTextEditorLink.ui UserInformation.ui
|
||||
TRANSLATIONS = mumble_en.ts mumble_es.ts mumble_de.ts mumble_fr.ts mumble_pl.ts mumble_ru.ts mumble_cs.ts mumble_it.ts mumble_ja.ts mumble_zh_CN.ts mumble_zh_TW.ts mumble_da.ts
|
||||
PRECOMPILED_HEADER = mumble_pch.hpp
|
||||
INCLUDEPATH *= ../bonjour
|
||||
|
||||
Loading…
Reference in New Issue
Block a user