mirror of https://github.com/qTox/qTox.git
Browse Source
Conflicts: core.cpp widget/form/settingsform.cpp widget/form/settingsform.hpull/288/head
69 changed files with 666 additions and 416 deletions
@ -1,2 +1,8 @@
@@ -1,2 +1,8 @@
|
||||
*.pro.user* |
||||
libs |
||||
*.o |
||||
moc_* |
||||
ui_* |
||||
qrc_* |
||||
Makefile |
||||
qtox |
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
#ifndef COREAV_H |
||||
#define COREAV_H |
||||
|
||||
#include <tox/toxav.h> |
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__) |
||||
#include <OpenAL/al.h> |
||||
#include <OpenAL/alc.h> |
||||
#else |
||||
#include <AL/al.h> |
||||
#include <AL/alc.h> |
||||
#endif |
||||
|
||||
class QTimer; |
||||
|
||||
struct ToxCall |
||||
{ |
||||
public: |
||||
ToxAvCSettings codecSettings; |
||||
QTimer *sendAudioTimer, *sendVideoTimer; |
||||
int callId; |
||||
int friendId; |
||||
bool videoEnabled; |
||||
bool active; |
||||
bool muteMic; |
||||
ALuint alSource; |
||||
}; |
||||
|
||||
#endif // COREAV_H
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
#ifndef COREDEFINES_H |
||||
#define COREDEFINES_H |
||||
|
||||
#define TOXAV_MAX_CALLS 16 |
||||
#define GROUPCHAT_MAX_SIZE 32 |
||||
#define TOX_SAVE_INTERVAL 30*1000 |
||||
#define TOX_FILE_INTERVAL 0 |
||||
#define TOX_BOOTSTRAP_INTERVAL 5*1000 |
||||
#define TOXAV_RINGING_TIME 15 |
||||
|
||||
// TODO: Put that in the settings
|
||||
#define TOXAV_MAX_VIDEO_WIDTH 1600 |
||||
#define TOXAV_MAX_VIDEO_HEIGHT 1200 |
||||
|
||||
#endif // COREDEFINES_H
|
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
#include "corestructs.h" |
||||
#include <QFile> |
||||
|
||||
ToxFile::ToxFile(int FileNum, int FriendId, QByteArray FileName, QString FilePath, FileDirection Direction) |
||||
: fileNum(FileNum), friendId(FriendId), fileName{FileName}, filePath{FilePath}, file{new QFile(filePath)}, |
||||
bytesSent{0}, filesize{0}, status{STOPPED}, direction{Direction}, sendTimer{nullptr} |
||||
{ |
||||
} |
||||
|
||||
void ToxFile::setFilePath(QString path) |
||||
{ |
||||
filePath=path; |
||||
file->setFileName(path); |
||||
} |
||||
|
||||
bool ToxFile::open(bool write) |
||||
{ |
||||
return write ? file->open(QIODevice::ReadWrite) : file->open(QIODevice::ReadOnly); |
||||
} |
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
#ifndef CORESTRUCTS_H |
||||
#define CORESTRUCTS_H |
||||
|
||||
// Some headers use Core structs but don't need to include all of core.h
|
||||
// They should include this file directly instead to reduce compilation times
|
||||
|
||||
#include <QString> |
||||
class QFile; |
||||
class QTimer; |
||||
|
||||
enum class Status : int {Online = 0, Away, Busy, Offline}; |
||||
|
||||
struct DhtServer |
||||
{ |
||||
QString name; |
||||
QString userId; |
||||
QString address; |
||||
int port; |
||||
}; |
||||
|
||||
struct ToxFile |
||||
{ |
||||
enum FileStatus |
||||
{ |
||||
STOPPED, |
||||
PAUSED, |
||||
TRANSMITTING |
||||
}; |
||||
|
||||
enum FileDirection : bool |
||||
{ |
||||
SENDING, |
||||
RECEIVING |
||||
}; |
||||
|
||||
ToxFile()=default; |
||||
ToxFile(int FileNum, int FriendId, QByteArray FileName, QString FilePath, FileDirection Direction); |
||||
~ToxFile(){} |
||||
void setFilePath(QString path); |
||||
bool open(bool write); |
||||
|
||||
int fileNum; |
||||
int friendId; |
||||
QByteArray fileName; |
||||
QString filePath; |
||||
QFile* file; |
||||
long long bytesSent; |
||||
long long filesize; |
||||
FileStatus status; |
||||
FileDirection direction; |
||||
QTimer* sendTimer; |
||||
}; |
||||
|
||||
#endif // CORESTRUCTS_H
|
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
#! /bin/bash |
||||
|
||||
if which apt-get; then |
||||
sudo apt-get install build-essential qt5-qmake qt5-default libopenal-dev libopencv-dev \ |
||||
libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev |
||||
elif which pacman; then |
||||
sudo pacman -S --needed base-devel qt5 opencv openal opus vpx |
||||
elif which yum; then |
||||
yum groupinstall "Development Tools" |
||||
yum install qt-devel qt-doc qt-creator opencv-devel openal-soft-devel libtool autoconf automake check check-devel |
||||
else |
||||
echo "Unknown package manager, attempting to compile anyways" |
||||
fi |
||||
|
||||
./bootstrap.sh |
||||
qmake |
||||
make |
After Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 403 B |
Loading…
Reference in new issue