-
Notifications
You must be signed in to change notification settings - Fork 0
/
Counter.h
40 lines (26 loc) · 1.08 KB
/
Counter.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
/*******************************************************************/
/* Original File Name: Counter.h */
/* Date: 21-06-2018 */
/* Developer: Dionysus Benstein */
/* Copyright © 2018 Dionysus Benstein. All rights reserved. */
/* Description: Класс основного функционала. */
/*******************************************************************/
#ifndef COUNTER_H
#define COUNTER_H
#include <QObject>
class Counter : public QObject
{
Q_OBJECT
public:
explicit Counter(QObject *parent = nullptr);
//Метод подсчёта символов
Q_INVOKABLE int lengthWithoutSpaces(const QString str) const;
//Метод подсчёта символов без знаков
Q_INVOKABLE int lengthWithoutSigns(const QString str) const;
//Метод подсчёта слов
Q_INVOKABLE int wordsCounter(const QString str) const;
private:
QString signs;
QString alph;
};
#endif //COUNTER_H