mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: sorted (several removed) headers, class declarations and fields
This commit is contained in:
parent
b074c831d3
commit
e9c7caf3e7
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2014-2015 by The qTox Project Contributors
|
Copyright © 2014-2017 by The qTox Project Contributors
|
||||||
|
|
||||||
This file is part of qTox, a Qt-based graphical interface for Tox.
|
This file is part of qTox, a Qt-based graphical interface for Tox.
|
||||||
|
|
||||||
|
@ -19,16 +19,6 @@
|
||||||
|
|
||||||
#include "genericchatform.h"
|
#include "genericchatform.h"
|
||||||
|
|
||||||
#include <QClipboard>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <QKeyEvent>
|
|
||||||
#include <QPushButton>
|
|
||||||
#include <QShortcut>
|
|
||||||
#include <QSplitter>
|
|
||||||
#include <QToolButton>
|
|
||||||
|
|
||||||
#include "src/chatlog/chatlog.h"
|
#include "src/chatlog/chatlog.h"
|
||||||
#include "src/chatlog/content/timestamp.h"
|
#include "src/chatlog/content/timestamp.h"
|
||||||
#include "src/core/core.h"
|
#include "src/core/core.h"
|
||||||
|
@ -45,11 +35,15 @@
|
||||||
#include "src/widget/maskablepixmapwidget.h"
|
#include "src/widget/maskablepixmapwidget.h"
|
||||||
#include "src/widget/style.h"
|
#include "src/widget/style.h"
|
||||||
#include "src/widget/tool/chattextedit.h"
|
#include "src/widget/tool/chattextedit.h"
|
||||||
#include "src/widget/tool/croppinglabel.h"
|
|
||||||
#include "src/widget/tool/flyoutoverlaywidget.h"
|
#include "src/widget/tool/flyoutoverlaywidget.h"
|
||||||
#include "src/widget/translator.h"
|
#include "src/widget/translator.h"
|
||||||
#include "src/widget/widget.h"
|
#include "src/widget/widget.h"
|
||||||
|
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QKeyEvent>
|
||||||
|
#include <QShortcut>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class GenericChatForm
|
* @class GenericChatForm
|
||||||
* @brief Parent class for all chatforms. It's provide the minimum required UI
|
* @brief Parent class for all chatforms. It's provide the minimum required UI
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright © 2014-2015 by The qTox Project Contributors
|
Copyright © 2014-2017 by The qTox Project Contributors
|
||||||
|
|
||||||
This file is part of qTox, a Qt-based graphical interface for Tox.
|
This file is part of qTox, a Qt-based graphical interface for Tox.
|
||||||
|
|
||||||
|
@ -20,15 +20,12 @@
|
||||||
#ifndef GENERICCHATFORM_H
|
#ifndef GENERICCHATFORM_H
|
||||||
#define GENERICCHATFORM_H
|
#define GENERICCHATFORM_H
|
||||||
|
|
||||||
#include <QDateTime>
|
|
||||||
#include <QMenu>
|
|
||||||
#include <QPoint>
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
#include "src/chatlog/chatmessage.h"
|
#include "src/chatlog/chatmessage.h"
|
||||||
#include "src/core/corestructs.h"
|
|
||||||
#include "src/core/toxid.h"
|
#include "src/core/toxid.h"
|
||||||
|
|
||||||
|
#include <QMenu>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Spacing in px inserted when the author of the last message changes
|
* Spacing in px inserted when the author of the last message changes
|
||||||
* @note Why the hell is this a thing? surely the different font is enough?
|
* @note Why the hell is this a thing? surely the different font is enough?
|
||||||
|
@ -37,19 +34,20 @@
|
||||||
|
|
||||||
QString resolveToxId(const ToxPk& id);
|
QString resolveToxId(const ToxPk& id);
|
||||||
|
|
||||||
class QLabel;
|
|
||||||
class QVBoxLayout;
|
|
||||||
class QPushButton;
|
|
||||||
class CroppingLabel;
|
|
||||||
class ChatTextEdit;
|
|
||||||
class ChatLog;
|
class ChatLog;
|
||||||
|
class ChatTextEdit;
|
||||||
|
class ContentLayout;
|
||||||
|
class CroppingLabel;
|
||||||
|
class FlyoutOverlayWidget;
|
||||||
|
class GenericNetCamView;
|
||||||
class MaskablePixmapWidget;
|
class MaskablePixmapWidget;
|
||||||
class Widget;
|
class Widget;
|
||||||
class FlyoutOverlayWidget;
|
|
||||||
class ContentLayout;
|
class QLabel;
|
||||||
|
class QPushButton;
|
||||||
class QSplitter;
|
class QSplitter;
|
||||||
class GenericNetCamView;
|
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
|
class QVBoxLayout;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
|
@ -59,7 +57,7 @@ class GenericChatForm : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit GenericChatForm(QWidget* parent = 0);
|
explicit GenericChatForm(QWidget* parent = nullptr);
|
||||||
~GenericChatForm();
|
~GenericChatForm();
|
||||||
|
|
||||||
void setName(const QString& newName);
|
void setName(const QString& newName);
|
||||||
|
@ -123,30 +121,46 @@ protected:
|
||||||
virtual bool eventFilter(QObject* object, QEvent* event) final override;
|
virtual bool eventFilter(QObject* object, QEvent* event) final override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QAction *saveChatAction, *clearAction, *quoteAction, *copyLinkAction;
|
|
||||||
ToxPk previousId;
|
|
||||||
QDateTime prevMsgDateTime;
|
|
||||||
Widget* parent;
|
|
||||||
QMenu menu;
|
|
||||||
int curRow;
|
|
||||||
CroppingLabel* nameLabel;
|
|
||||||
MaskablePixmapWidget* avatar;
|
|
||||||
QWidget* headWidget;
|
|
||||||
QPushButton *fileButton, *screenshotButton, *emoteButton, *callButton;
|
|
||||||
QPushButton* videoButton;
|
|
||||||
QToolButton *volButton, *micButton;
|
|
||||||
FlyoutOverlayWidget* fileFlyout;
|
|
||||||
QVBoxLayout* headTextLayout;
|
|
||||||
ChatTextEdit* msgEdit;
|
|
||||||
QPushButton* sendButton;
|
|
||||||
ChatLog* chatWidget;
|
|
||||||
QDateTime earliestMessage;
|
|
||||||
|
|
||||||
QDateTime historyBaselineDate = QDateTime::currentDateTime();
|
|
||||||
bool audioInputFlag;
|
bool audioInputFlag;
|
||||||
bool audioOutputFlag;
|
bool audioOutputFlag;
|
||||||
|
int curRow;
|
||||||
|
|
||||||
|
QAction* saveChatAction;
|
||||||
|
QAction* clearAction;
|
||||||
|
QAction* quoteAction;
|
||||||
|
QAction* copyLinkAction;
|
||||||
|
|
||||||
|
ToxPk previousId;
|
||||||
|
|
||||||
|
QDateTime prevMsgDateTime;
|
||||||
|
QDateTime earliestMessage;
|
||||||
|
QDateTime historyBaselineDate = QDateTime::currentDateTime();
|
||||||
|
|
||||||
|
QMenu menu;
|
||||||
|
|
||||||
|
QPushButton* callButton;
|
||||||
|
QPushButton* emoteButton;
|
||||||
|
QPushButton* fileButton;
|
||||||
|
QPushButton* screenshotButton;
|
||||||
|
QPushButton* sendButton;
|
||||||
|
QPushButton* videoButton;
|
||||||
|
|
||||||
QSplitter* bodySplitter;
|
QSplitter* bodySplitter;
|
||||||
|
|
||||||
|
QToolButton* volButton;
|
||||||
|
QToolButton* micButton;
|
||||||
|
|
||||||
|
QVBoxLayout* headTextLayout;
|
||||||
|
|
||||||
|
QWidget* headWidget;
|
||||||
|
|
||||||
|
ChatLog* chatWidget;
|
||||||
|
ChatTextEdit* msgEdit;
|
||||||
|
CroppingLabel* nameLabel;
|
||||||
|
FlyoutOverlayWidget* fileFlyout;
|
||||||
GenericNetCamView* netcam;
|
GenericNetCamView* netcam;
|
||||||
|
MaskablePixmapWidget* avatar;
|
||||||
|
Widget* parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GENERICCHATFORM_H
|
#endif // GENERICCHATFORM_H
|
||||||
|
|
Loading…
Reference in New Issue
Block a user