Browse Source

refactor: Small Generic chat form refactoring

reviewable/pr4094/r1
Diadlo 9 years ago committed by Zetok Zalbavar
parent
commit
ece4d9e446
No known key found for this signature in database
GPG Key ID: C953D3880212068A
  1. 13
      src/widget/form/genericchatform.cpp
  2. 8
      src/widget/form/genericchatform.h

13
src/widget/form/genericchatform.cpp

@ -49,7 +49,18 @@ @@ -49,7 +49,18 @@
#include "src/widget/translator.h"
#include "src/widget/widget.h"
GenericChatForm::GenericChatForm(QWidget* parent)
/**
* @class GenericChatForm
* @brief Parent class for all chatforms. It's provide the minimum required UI
* elements and methods to work with chat messages.
*
* TODO: reword
* @var GenericChatForm::historyBaselineDate
* @brief Used by HistoryKeeper to load messages from t to historyBaselineDate
* (excluded)
*/
GenericChatForm::GenericChatForm(QWidget *parent)
: QWidget(parent, Qt::Window)
, audioInputFlag(false)
, audioOutputFlag(false)

8
src/widget/form/genericchatform.h

@ -20,10 +20,11 @@ @@ -20,10 +20,11 @@
#ifndef GENERICCHATFORM_H
#define GENERICCHATFORM_H
#include <QWidget>
#include <QPoint>
#include <QDateTime>
#include <QMenu>
#include <QPoint>
#include <QWidget>
#include "src/core/corestructs.h"
#include "src/chatlog/chatmessage.h"
#include "src/core/toxid.h"
@ -131,7 +132,8 @@ protected: @@ -131,7 +132,8 @@ protected:
QPushButton *sendButton;
ChatLog *chatWidget;
QDateTime earliestMessage;
QDateTime historyBaselineDate = QDateTime::currentDateTime(); // used by HistoryKeeper to load messages from t to historyBaselineDate (excluded)
QDateTime historyBaselineDate = QDateTime::currentDateTime();
bool audioInputFlag;
bool audioOutputFlag;
QSplitter* bodySplitter;

Loading…
Cancel
Save