Improve compile times a tiny bit
This commit is contained in:
parent
4e5bd53b13
commit
4ee9e5c27c
24 changed files with 104 additions and 65 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
#include <QEvent>
|
||||
#include <QFileDialog>
|
||||
#include <QFontDatabase>
|
||||
#include <QImageReader>
|
||||
|
|
@ -41,6 +42,17 @@ constexpr int WIDGET_SPACING = 15;
|
|||
constexpr int TEXT_SPACING = 4;
|
||||
constexpr int BUTTON_SPACING = 2 * TEXT_SPACING;
|
||||
|
||||
bool
|
||||
ClickableFilter::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonRelease) {
|
||||
emit clicked();
|
||||
return true;
|
||||
}
|
||||
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
EditModal::EditModal(const QString &roomId, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, roomId_{roomId}
|
||||
|
|
@ -93,6 +105,28 @@ EditModal::EditModal(const QString &roomId, QWidget *parent)
|
|||
move(center.x() - (width() * 0.5), center.y() - (height() * 0.5));
|
||||
}
|
||||
|
||||
void
|
||||
EditModal::topicEventSent()
|
||||
{
|
||||
errorField_->hide();
|
||||
close();
|
||||
}
|
||||
|
||||
void
|
||||
EditModal::nameEventSent(const QString &name)
|
||||
{
|
||||
errorField_->hide();
|
||||
emit nameChanged(name);
|
||||
close();
|
||||
}
|
||||
|
||||
void
|
||||
EditModal::error(const QString &msg)
|
||||
{
|
||||
errorField_->setText(msg);
|
||||
errorField_->show();
|
||||
}
|
||||
|
||||
void
|
||||
EditModal::applyClicked()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue