Create directories for related files

This commit is contained in:
Konstantinos Sideris 2017-11-30 13:53:28 +02:00
parent 5663c58dd9
commit 32c8340577
35 changed files with 135 additions and 107 deletions

View file

@ -0,0 +1,46 @@
/*
* nheko Copyright (C) 2017 Konstantinos Sideris <siderisk@auth.gr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QDialog>
#include <QMouseEvent>
#include <QPixmap>
class ImageOverlayDialog : public QWidget
{
Q_OBJECT
public:
ImageOverlayDialog(QPixmap image, QWidget *parent = nullptr);
protected:
void mousePressEvent(QMouseEvent *event) override;
void paintEvent(QPaintEvent *event) override;
signals:
void closing();
private:
void scaleImage(int width, int height);
QPixmap originalImage_;
QPixmap image_;
QRect content_;
QRect close_button_;
QRect screen_;
};

View file

@ -0,0 +1,22 @@
#pragma once
#include <QFrame>
#include <QLineEdit>
class FlatButton;
class JoinRoomDialog : public QFrame
{
Q_OBJECT
public:
JoinRoomDialog(QWidget *parent = nullptr);
signals:
void closing(bool isJoining, QString roomAlias);
private:
FlatButton *confirmBtn_;
FlatButton *cancelBtn_;
QLineEdit *roomAliasEdit_;
};

View file

@ -0,0 +1,22 @@
#pragma once
#include <QFrame>
class FlatButton;
class LeaveRoomDialog : public QFrame
{
Q_OBJECT
public:
explicit LeaveRoomDialog(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void closing(bool isLeaving);
private:
FlatButton *confirmBtn_;
FlatButton *cancelBtn_;
};

View file

@ -0,0 +1,39 @@
/*
* nheko Copyright (C) 2017 Konstantinos Sideris <siderisk@auth.gr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QFrame>
class FlatButton;
class LogoutDialog : public QFrame
{
Q_OBJECT
public:
explicit LogoutDialog(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void closing(bool isLoggingOut);
private:
FlatButton *confirmBtn_;
FlatButton *cancelBtn_;
};