Vagyojaka 5.5.7
Loading...
Searching...
No Matches
tool.h
Go to the documentation of this file.
1#pragma once
2
3#include <qmainwindow.h>
4#include "about.h"
6#include "git/git.h"
8#include "editor/texteditor.h"
9#include<QThread>
10#include<QtConcurrent/QtConcurrent>
13#include "qmainwindow.h"
14
15#include"audiowaveform.h"
16#include "qmediadevices.h"
17#include "qtablewidget.h"
18#include "tts/ttsrow.h"
19QT_BEGIN_NAMESPACE
20namespace Ui { class Tool; }
21QT_END_NAMESPACE
22
29class Tool final : public QMainWindow
30{
31 Q_OBJECT
32
33public:
34
42 explicit Tool(QWidget *parent = nullptr);
43
49 ~Tool() final;
50
51public slots:
52
53protected:
54
62 void keyPressEvent(QKeyEvent *event) override;
63
69 void dragEnterEvent(QDragEnterEvent *event) override;
70
76 void dropEvent(QDropEvent *event) override;
77
83 void dragMoveEvent(QDragMoveEvent *event) override;
84
90 void resizeEvent(QResizeEvent *event) override;
91
92
93private slots:
94
100
109
113 void changeFont();
114
120 void changeFontSize(int change);
121
127 void transliterationSelected(QAction* action);
128
135 void createMediaSplitter();
136
146 // void on_editor_openTranscript_triggered();
147
154
164
173
182
189
197
205
213
220 void on_get_PDF_clicked();
221
228
235
244
253
259 void on_fontComboBox_currentFontChanged(const QFont &f);
260
268
277
285
293
301
309
319
328
337
350
359
368
377
378private:
379
389 void setFontForElements();
390
402
410 bool isDroppedOnLayout(const QPoint &pos, QVBoxLayout *layout);
411
418 QVector<TTSRow> parseXML(const QUrl& fileUrl);
419
430
442 void onTabChanged(int index);
443
449 MediaPlayer *player = nullptr;
450
456 QAudioOutput *m_audioOutput = nullptr;
457
464 Ui::Tool *ui;
465
472 QFont font;
473
480 QMap<QString, QString> m_transliterationLang;
481
487 Git* git = nullptr;
488
495
501 bool isSamplingSuccess = false;
502
508 QSettings* settings;
509
516
522 About* about = nullptr;
523
529 QMediaDevices m_mediaDevices;
530};
Definition about.h:11
Definition git.h:16
Definition keyboardshortcutguide.h:8
Definition mediaplayer.h:30
The Tool class (Main Window)
Definition tool.h:30
bool isSamplingSuccess
Flag indicating if audio sampling was successful.
Definition tool.h:501
void on_actionUpdate_Timestamps_triggered()
Triggered when the "Update Timestamps" action is invoked.
Definition tool.cpp:833
void on_actionAbout_triggered()
Triggered when the "About" action is invoked.
Definition tool.cpp:687
MediaPlayer * player
Pointer to the media player instance.
Definition tool.h:449
void on_keyboard_shortcuts_clicked()
Opens the keyboard shortcuts guide.
Definition tool.cpp:672
void resizeEvent(QResizeEvent *event) override
Handles resize events.
Definition tool.cpp:820
void on_actionAdd_Remote_URL_triggered()
Triggered when the "Add Remote URL" action is invoked.
Definition tool.cpp:724
QSettings * settings
Pointer to application settings.
Definition tool.h:508
void dragMoveEvent(QDragMoveEvent *event) override
Handles drag move events.
Definition tool.cpp:771
void on_save_as_transcript_clicked()
Triggered when the "Save As Transcript" button is clicked.
Definition tool.cpp:635
bool isDroppedOnLayout(const QPoint &pos, QVBoxLayout *layout)
isDroppedOnLayout
Definition tool.cpp:796
void on_increaseFontSize_clicked()
Triggered when the "Increase Font Size" button is clicked.
Definition tool.cpp:659
void on_actionSave_Timestamps_triggered()
Triggered when the "Update Timestamps" action is invoked.
Definition tool.cpp:827
void keyPressEvent(QKeyEvent *event) override
Handles key press events.
Definition tool.cpp:306
void setFontForElements()
Sets the font for various UI elements.
Definition tool.cpp:392
void on_actionInit_triggered()
Triggered when the "Initialize" action is invoked.
Definition tool.cpp:706
void onTabChanged(int index)
Handles tab change events in the UI.
Definition tool.cpp:810
void dragEnterEvent(QDragEnterEvent *event) override
Handles drag enter events.
Definition tool.cpp:764
QVector< TTSRow > parseXML(const QUrl &fileUrl)
parseXML
void transliterationSelected(QAction *action)
Handles the selection of a transliteration action.
Definition tool.cpp:412
void on_actionShow_Waveform_triggered()
Triggered when the "Show Waveform" action is invoked.
Definition tool.cpp:805
QAudioOutput * m_audioOutput
Pointer to the audio output instance.
Definition tool.h:456
void on_actionOpen_triggered()
Triggered when the "Open" action from TTS options is invoked.
Definition tool.cpp:856
void on_load_a_custom_dict_clicked()
Triggered when the "Load Custom Dictionary" button is clicked.
Definition tool.cpp:641
void on_open_transcript_clicked()
Triggered when the editor to open a transcript is invoked.
Definition tool.cpp:617
~Tool() final
Destroys the Tool object.
Definition tool.cpp:274
void on_btn_translate_clicked()
Triggered when the translate button is clicked.
Definition tool.cpp:480
Tool(QWidget *parent=nullptr)
Constructs a Tool object.
Definition tool.cpp:22
void setDefaultAudioOutputDevice()
Sets the default audio output device.
Definition tool.cpp:844
void changeFont()
Changes the font of the application.
Definition tool.cpp:377
void on_save_transcript_clicked()
Triggered when the "Save Transcript" button is clicked.
Definition tool.cpp:629
Git * git
Pointer to the Git management class.
Definition tool.h:487
void handleMediaPlayerError()
Handles errors from the media player and prints at statusbar.
Definition tool.cpp:292
void on_fontComboBox_currentFontChanged(const QFont &f)
Updates the font based on the current selection in the font combo box.
Definition tool.cpp:678
QFont font
Font used for various text elements in the UI.
Definition tool.h:472
bool isSendingSampleRateSuccess
Flag indicating if sending sample rate was successful.
Definition tool.h:494
QMediaDevices m_mediaDevices
Object representing available media devices.
Definition tool.h:529
QMap< QString, QString > m_transliterationLang
Map of transliteration languages and their corresponding codes.
Definition tool.h:480
void connectWaveformAndMediaplayer()
Connects the waveform visualization and the media player.
Definition tool.cpp:281
void on_editor_openTranscript_triggered()
Triggered when the "Open Transcript" button is clicked.
Definition tool.cpp:593
void setTransliterationLangCodes()
Sets up transliteration language codes.
Definition tool.cpp:403
KeyboardShortcutGuide * help_keyshortcuts
Pointer to the keyboard shortcut guide.
Definition tool.h:515
void dropEvent(QDropEvent *event) override
Handles drop events.
Definition tool.cpp:776
About * about
Pointer to the About dialog.
Definition tool.h:522
void createKeyboardShortcutGuide()
Creates a guide for keyboard shortcuts.
Definition tool.cpp:334
void on_actionCommit_triggered()
Triggered when the "Commit" action is invoked.
Definition tool.cpp:718
Ui::Tool * ui
Pointer to the UI components.
Definition tool.h:464
void on_toggleWordEditor_clicked()
Toggles the visibility of the word editor.
Definition tool.cpp:666
void createMediaSplitter()
Creates a media splitter.
Definition tool.cpp:353
void on_new_transcript_clicked()
Triggered when the "New Transcript" button is clicked.
Definition tool.cpp:623
void on_Upload_and_generate_Transcript_triggered()
Triggered when the upload and generate transcript action is invoked.
Definition tool.cpp:428
void on_actionPull_triggered()
Triggered when the "Pull" action is invoked.
Definition tool.cpp:736
void on_add_video_clicked()
Triggered when the "Open Video/Audio" button is clicked in the GUI.
Definition tool.cpp:611
void on_actionShow_Endlines_triggered()
Triggered when the "Show Endlines" action is invoked.
Definition tool.cpp:839
void on_get_PDF_clicked()
Triggered when the "Get PDF" button is clicked.
Definition tool.cpp:647
void on_decreseFontSize_clicked()
Triggered when the "Decrease Font Size" button is clicked.
Definition tool.cpp:653
void on_actionAdd_All_triggered()
Triggered when the "Add All" action is invoked.
Definition tool.cpp:712
void changeFontSize(int change)
Changes the font size.
Definition tool.cpp:386
void on_actionPush_triggered()
Triggered when the "Push" action is invoked.
Definition tool.cpp:730
Definition about.h:6