Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bold feature #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions FrameWorkCode/.qmake.stash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
QMAKE_CXX.INCDIRS = \
/usr/include/c++/7 \
/usr/include/x86_64-linux-gnu/c++/7 \
/usr/include/c++/7/backward \
/usr/lib/gcc/x86_64-linux-gnu/7/include \
/usr/local/include \
/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_CXX.LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/7 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 5
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
1 change: 1 addition & 0 deletions FrameWorkCode/AppResources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
<file>New.png</file>
<file>cut.png</file>
<file>copy.png</file>
<file>bold.png</file>
</qresource>
</RCC>
459 changes: 459 additions & 0 deletions FrameWorkCode/Makefile

Large diffs are not rendered by default.

Binary file added FrameWorkCode/bold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified FrameWorkCode/main.o
Binary file not shown.
6 changes: 6 additions & 0 deletions FrameWorkCode/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->textBrowser->installEventFilter(this);
ui->textBrowser->setLineWrapColumnOrWidth(QTextEdit::NoWrap);
//QObject::connect(ui->textBrowser,SIGNAL(textChanged()),this,SLOT(textChangedSlot()));
// connect(ui->actionBold, &QAction::triggered, this, &MainWindow::on_actionBold_triggered);
QString str = "SLP1 Guide:";
str += "\n";
str += "डॉ,, ड़,, ढ़,, अ - a,, आ/ ा - A,, इ/ ि - i,, ई/ ी - I,, उ/ ु - u,, ऊ/ ू - U,, ऋ/ ृ - f,, ॠ/ ॄ - F,, ऌ/ ॢ - x,, ॡ/ \"ॣ\” - X,, ए/ े - e,, ऐ/ ै - E,, ओ/ ो - o,, औ/ ौ - O,, ं - M,, ः - H,, ँ - ~,, ऽ - $,, ॐ - %,, ज्ञ - jYa ,, ळ ,, त्र - tra,, श्र - Sra,, क्ष्/क्ष - kz/kza,, द्य्/द्य - dy/dya,, क्/क - k/ka,, ख्/ख - K/Ka,, ग्/ग - g/ga,, घ्/घ - G/Ga,, ङ्/ङ - N/Na,, च्/च - c/ca,, छ्/छ - C/Ca,, ज्/ज - j/ja,, झ्/झ - J/Ja,, ञ्/ञ - Y/Ya,, ट्/ट - w/wa,, ठ्/ठ - W/Wa,, ड्/ड - q/qa,, ढ्/ढ - Q/Qa,, ण्/ण - R/Ra,, त्/त - t/ta,, थ्/थ - T/Ta,, द्/द - d/da,, ध्/ध - D/Da,, न्/न - n/na,, प्/प - p/pa,, फ्/फ - P/Pa,, ब्/ब - b/ba,, भ्/भ - B/Ba,, म्/म - m/ma,, य्/य - y/ya,, र्/र - r/ra,, ल्/ल - l/la,, व्/व - v/va,, श्/श - S/Sa,, ष्/ष - z/za,, स्/स - s/sa,, ह्/ह - h/ha,, ळ्/ळ - &/&a,, ऩ् -%,, फ़् - ^,, य़् - L,, ऱ् - V,,१ - 1,, २ - 2,, ३ - 3,, ४ - 4,, ५ - 5,, ६ - 6,, ७ - 7,, ८ - 8,, ९ - 9,, ० - 0,, । - |,, ॥ - ||";
Expand Down Expand Up @@ -2429,3 +2430,8 @@ void MainWindow::on_actionEnglish_triggered()
{
HinFlag = 0 , SanFlag = 0;
}

void MainWindow::on_actionBold_triggered(bool checked)
{
checked ? ui->textBrowser->setFontWeight(QFont::Bold) : ui->textBrowser->setFontWeight(QFont::Normal);
}
2 changes: 2 additions & 0 deletions FrameWorkCode/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ private slots:

void on_actionEnglish_triggered();

void on_actionBold_triggered(bool checked);

private:
Ui::MainWindow *ui;

Expand Down
Binary file added FrameWorkCode/mainwindow.o
Binary file not shown.
23 changes: 23 additions & 0 deletions FrameWorkCode/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,15 @@ p, li { white-space: pre-wrap; }
<addaction name="actionHindi"/>
<addaction name="actionEnglish"/>
</widget>
<widget class="QMenu" name="menuText">
<property name="title">
<string>Text</string>
</property>
<addaction name="actionBold"/>
</widget>
<addaction name="menuSelectLanguage"/>
<addaction name="menuOCR_Correction_Window"/>
<addaction name="menuText"/>
<addaction name="menuCreateReports"/>
<addaction name="menuSaveVariables"/>
<addaction name="menuConvertFiles"/>
Expand All @@ -227,6 +234,7 @@ p, li { white-space: pre-wrap; }
<addaction name="actionOpen"/>
<addaction name="actionSave"/>
<addaction name="actionSave_As"/>
<addaction name="actionBold"/>
<addaction name="actionLoadData"/>
<addaction name="separator"/>
<addaction name="actionSpell_Check"/>
Expand Down Expand Up @@ -490,6 +498,21 @@ p, li { white-space: pre-wrap; }
<string>English</string>
</property>
</action>
<action name="actionBold">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="AppResources.qrc">
<normaloff>:/Images/bold.png</normaloff>:/Images/bold.png</iconset>
</property>
<property name="text">
<string>Bold</string>
</property>
<property name="shortcut">
<string>Ctrl+B</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
Expand Down
115 changes: 62 additions & 53 deletions FrameWorkCode/moc_mainwindow.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.9.5)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
Expand All @@ -12,15 +12,17 @@
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mainwindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.5.1. It"
#error "This file was generated using the moc from 5.9.5. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif

QT_BEGIN_MOC_NAMESPACE
QT_WARNING_PUSH
QT_WARNING_DISABLE_DEPRECATED
struct qt_meta_stringdata_MainWindow_t {
QByteArrayData data[45];
char stringdata0[1272];
QByteArrayData data[47];
char stringdata0[1304];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
Expand Down Expand Up @@ -73,7 +75,9 @@ QT_MOC_LITERAL(40, 1116, 34), // "on_actionPrepareFeatures_trig..."
QT_MOC_LITERAL(41, 1151, 40), // "on_actionErrorDetectionRepUni..."
QT_MOC_LITERAL(42, 1192, 27), // "on_actionSanskrit_triggered"
QT_MOC_LITERAL(43, 1220, 24), // "on_actionHindi_triggered"
QT_MOC_LITERAL(44, 1245, 26) // "on_actionEnglish_triggered"
QT_MOC_LITERAL(44, 1245, 26), // "on_actionEnglish_triggered"
QT_MOC_LITERAL(45, 1272, 23), // "on_actionBold_triggered"
QT_MOC_LITERAL(46, 1296, 7) // "checked"

},
"MainWindow\0on_actionNew_triggered\0\0"
Expand Down Expand Up @@ -113,7 +117,8 @@ QT_MOC_LITERAL(44, 1245, 26) // "on_actionEnglish_triggered"
"on_actionErrorDetectionRepUniq_triggered\0"
"on_actionSanskrit_triggered\0"
"on_actionHindi_triggered\0"
"on_actionEnglish_triggered"
"on_actionEnglish_triggered\0"
"on_actionBold_triggered\0checked"
};
#undef QT_MOC_LITERAL

Expand All @@ -123,53 +128,54 @@ static const uint qt_meta_data_MainWindow[] = {
7, // revision
0, // classname
0, 0, // classinfo
39, 14, // methods
40, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount

// slots: name, argc, parameters, tag, flags
1, 0, 209, 2, 0x08 /* Private */,
3, 0, 210, 2, 0x08 /* Private */,
4, 0, 211, 2, 0x08 /* Private */,
5, 0, 212, 2, 0x08 /* Private */,
6, 0, 213, 2, 0x08 /* Private */,
7, 1, 214, 2, 0x08 /* Private */,
10, 1, 217, 2, 0x08 /* Private */,
13, 0, 220, 2, 0x08 /* Private */,
14, 0, 221, 2, 0x08 /* Private */,
15, 0, 222, 2, 0x08 /* Private */,
16, 0, 223, 2, 0x08 /* Private */,
17, 0, 224, 2, 0x08 /* Private */,
18, 0, 225, 2, 0x08 /* Private */,
19, 0, 226, 2, 0x08 /* Private */,
20, 0, 227, 2, 0x08 /* Private */,
21, 0, 228, 2, 0x08 /* Private */,
22, 0, 229, 2, 0x08 /* Private */,
23, 0, 230, 2, 0x08 /* Private */,
24, 0, 231, 2, 0x08 /* Private */,
25, 0, 232, 2, 0x08 /* Private */,
26, 0, 233, 2, 0x08 /* Private */,
27, 0, 234, 2, 0x08 /* Private */,
28, 0, 235, 2, 0x08 /* Private */,
29, 0, 236, 2, 0x08 /* Private */,
30, 0, 237, 2, 0x08 /* Private */,
31, 0, 238, 2, 0x08 /* Private */,
32, 0, 239, 2, 0x08 /* Private */,
33, 0, 240, 2, 0x08 /* Private */,
34, 0, 241, 2, 0x08 /* Private */,
35, 0, 242, 2, 0x08 /* Private */,
36, 0, 243, 2, 0x08 /* Private */,
37, 0, 244, 2, 0x08 /* Private */,
38, 0, 245, 2, 0x08 /* Private */,
39, 0, 246, 2, 0x08 /* Private */,
40, 0, 247, 2, 0x08 /* Private */,
41, 0, 248, 2, 0x08 /* Private */,
42, 0, 249, 2, 0x08 /* Private */,
43, 0, 250, 2, 0x08 /* Private */,
44, 0, 251, 2, 0x08 /* Private */,
1, 0, 214, 2, 0x08 /* Private */,
3, 0, 215, 2, 0x08 /* Private */,
4, 0, 216, 2, 0x08 /* Private */,
5, 0, 217, 2, 0x08 /* Private */,
6, 0, 218, 2, 0x08 /* Private */,
7, 1, 219, 2, 0x08 /* Private */,
10, 1, 222, 2, 0x08 /* Private */,
13, 0, 225, 2, 0x08 /* Private */,
14, 0, 226, 2, 0x08 /* Private */,
15, 0, 227, 2, 0x08 /* Private */,
16, 0, 228, 2, 0x08 /* Private */,
17, 0, 229, 2, 0x08 /* Private */,
18, 0, 230, 2, 0x08 /* Private */,
19, 0, 231, 2, 0x08 /* Private */,
20, 0, 232, 2, 0x08 /* Private */,
21, 0, 233, 2, 0x08 /* Private */,
22, 0, 234, 2, 0x08 /* Private */,
23, 0, 235, 2, 0x08 /* Private */,
24, 0, 236, 2, 0x08 /* Private */,
25, 0, 237, 2, 0x08 /* Private */,
26, 0, 238, 2, 0x08 /* Private */,
27, 0, 239, 2, 0x08 /* Private */,
28, 0, 240, 2, 0x08 /* Private */,
29, 0, 241, 2, 0x08 /* Private */,
30, 0, 242, 2, 0x08 /* Private */,
31, 0, 243, 2, 0x08 /* Private */,
32, 0, 244, 2, 0x08 /* Private */,
33, 0, 245, 2, 0x08 /* Private */,
34, 0, 246, 2, 0x08 /* Private */,
35, 0, 247, 2, 0x08 /* Private */,
36, 0, 248, 2, 0x08 /* Private */,
37, 0, 249, 2, 0x08 /* Private */,
38, 0, 250, 2, 0x08 /* Private */,
39, 0, 251, 2, 0x08 /* Private */,
40, 0, 252, 2, 0x08 /* Private */,
41, 0, 253, 2, 0x08 /* Private */,
42, 0, 254, 2, 0x08 /* Private */,
43, 0, 255, 2, 0x08 /* Private */,
44, 0, 256, 2, 0x08 /* Private */,
45, 1, 257, 2, 0x08 /* Private */,

// slots: parameters
QMetaType::Void,
Expand Down Expand Up @@ -211,6 +217,7 @@ static const uint qt_meta_data_MainWindow[] = {
QMetaType::Void,
QMetaType::Void,
QMetaType::Void,
QMetaType::Void, QMetaType::Bool, 46,

0 // eod
};
Expand Down Expand Up @@ -260,6 +267,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
case 36: _t->on_actionSanskrit_triggered(); break;
case 37: _t->on_actionHindi_triggered(); break;
case 38: _t->on_actionEnglish_triggered(); break;
case 39: _t->on_actionBold_triggered((*reinterpret_cast< bool(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
Expand All @@ -278,7 +286,7 @@ void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,

const QMetaObject MainWindow::staticMetaObject = {
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data,
qt_meta_data_MainWindow, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr}
};


Expand All @@ -289,9 +297,9 @@ const QMetaObject *MainWindow::metaObject() const

void *MainWindow::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!_clname) return nullptr;
if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0))
return static_cast<void*>(const_cast< MainWindow*>(this));
return static_cast<void*>(this);
return QMainWindow::qt_metacast(_clname);
}

Expand All @@ -301,14 +309,15 @@ int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 39)
if (_id < 40)
qt_static_metacall(this, _c, _id, _a);
_id -= 39;
_id -= 40;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 39)
if (_id < 40)
qt_static_metacall(this, _c, _id, _a);
_id -= 39;
_id -= 40;
}
return _id;
}
QT_WARNING_POP
QT_END_MOC_NAMESPACE
Binary file modified FrameWorkCode/moc_mainwindow.o
Binary file not shown.
Loading