-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmswidget.h
83 lines (70 loc) · 2.4 KB
/
smswidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
Copyright (C) <2011>
<enrico bacis> <[email protected]>
<ivan vaccari> <[email protected]>
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/>.
*/
#ifndef SMSWIDGET_H
#define SMSWIDGET_H
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QDateTime>
#include <QListWidgetItem>
#include "libjacksms/libJackSMS.h"
#include <QResizeEvent>
#include <qmymessage.h>
class SmsWidget : public QFrame
{
Q_OBJECT
private:
QString originalText;
QLabel *labelTxt,*labelGroup,*labelTime,*labelIco,*labelIcoReceived;
QVBoxLayout *vLayout;
QHBoxLayout *hLayout;
QMyMessage msg;
bool type;
QString id;
QString name;
bool nameFiltered;
libJackSMS::dataTypes::phoneNumber number;
bool readed;
QString parseLinks(QString _s);
QString parseAts(QString _s);
QString parseQuotes(QString _s);
void createBubble(bool isread, bool isreceived);
const QDateTime dateTim;
bool caricaAltri;
private slots:
void openUrl(QString _url);
public:
SmsWidget(QString _txt,QPixmap _ico,bool received,QDateTime time,QString user,QString service,QString id,libJackSMS::dataTypes::phoneNumber _number,bool _letto=true);
SmsWidget(QMyMessage _sms,QPixmap _ico,bool received);
//solo per il "Carica Altri Messaggi"
SmsWidget(QString _txt);
bool isCaricaAltri()const;
QString getId()const;
bool isReceived()const;
bool searchMatch(QString _txt);
bool isReaded()const;
void setReaded(bool _r);
QString getText()const;
QString getName()const;
void setName(QString newname);
libJackSMS::dataTypes::phoneNumber getPhoneNum()const;
//void resizeEvent (QResizeEvent*);
QSize getSize();
void setNameFilteredHidden(bool _nf);
bool isNameFilteredHidden();
QDateTime getDateTime()const;
};
#endif // SMSWIDGET_H