2016-06-30 21:39:04 +03:00
|
|
|
/************************************************************************
|
|
|
|
* file name : main_window.h
|
|
|
|
* ----------------- :
|
|
|
|
* creation time : 2016/06/26
|
|
|
|
* author : Victor Zarubkin
|
|
|
|
* email : v.s.zarubkin@gmail.com
|
|
|
|
* ----------------- :
|
|
|
|
* description : The file contains declaration of MainWindow for easy_profiler GUI.
|
|
|
|
* ----------------- :
|
|
|
|
* change log : * 2016/06/26 Victor Zarubkin: initial commit.
|
|
|
|
* : *
|
|
|
|
* ----------------- :
|
2016-09-06 21:49:32 +03:00
|
|
|
* license : Lightweight profiler library for c++
|
2018-01-29 23:29:43 +03:00
|
|
|
* : Copyright(C) 2016-2018 Sergey Yagovtsev, Victor Zarubkin
|
2016-09-06 21:49:32 +03:00
|
|
|
* :
|
2017-03-30 06:14:23 +03:00
|
|
|
* : Licensed under either of
|
|
|
|
* : * MIT license (LICENSE.MIT or http://opensource.org/licenses/MIT)
|
|
|
|
* : * Apache License, Version 2.0, (LICENSE.APACHE or http://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
* : at your option.
|
2016-11-13 16:39:59 +03:00
|
|
|
* :
|
2017-03-30 06:14:23 +03:00
|
|
|
* : The MIT License
|
|
|
|
* :
|
|
|
|
* : Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* : of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* : in the Software without restriction, including without limitation the rights
|
|
|
|
* : to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* : of the Software, and to permit persons to whom the Software is furnished
|
|
|
|
* : to do so, subject to the following conditions:
|
|
|
|
* :
|
|
|
|
* : The above copyright notice and this permission notice shall be included in all
|
|
|
|
* : copies or substantial portions of the Software.
|
|
|
|
* :
|
|
|
|
* : THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
|
|
* : INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
|
|
* : PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
* : LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* : TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
|
|
* : USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
* :
|
|
|
|
* : The Apache License, Version 2.0 (the "License")
|
|
|
|
* :
|
|
|
|
* : You may not use this file except in compliance with the License.
|
2016-11-13 16:39:59 +03:00
|
|
|
* : You may obtain a copy of the License at
|
|
|
|
* :
|
|
|
|
* : http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* :
|
|
|
|
* : Unless required by applicable law or agreed to in writing, software
|
|
|
|
* : distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* : See the License for the specific language governing permissions and
|
|
|
|
* : limitations under the License.
|
2016-06-26 20:54:16 +03:00
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef EASY_PROFILER_GUI__MAIN_WINDOW__H
|
|
|
|
#define EASY_PROFILER_GUI__MAIN_WINDOW__H
|
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
#include <atomic>
|
2016-09-18 20:20:37 +03:00
|
|
|
#include <sstream>
|
2018-04-22 03:34:26 +03:00
|
|
|
#include <string>
|
|
|
|
#include <thread>
|
2016-09-18 20:20:37 +03:00
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
#include <QMainWindow>
|
2017-11-16 22:32:28 +03:00
|
|
|
#include <QDockWidget>
|
2016-08-18 23:26:41 +03:00
|
|
|
#include <QTimer>
|
2016-12-11 03:27:42 +03:00
|
|
|
#include <QStringList>
|
2016-09-18 20:20:37 +03:00
|
|
|
|
2017-03-05 23:50:38 +03:00
|
|
|
#include <easy/easy_socket.h>
|
|
|
|
#include <easy/reader.h>
|
2016-09-18 20:20:37 +03:00
|
|
|
|
|
|
|
#ifdef max
|
2016-09-16 02:11:11 +03:00
|
|
|
#undef max
|
2016-09-18 20:20:37 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef min
|
2016-09-16 02:11:11 +03:00
|
|
|
#undef min
|
2016-09-18 20:20:37 +03:00
|
|
|
#endif
|
2016-06-26 20:54:16 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-09-17 18:43:06 +03:00
|
|
|
#define EASY_GUI_USE_DESCRIPTORS_DOCK_WINDOW 0
|
|
|
|
|
2016-09-28 00:37:20 +03:00
|
|
|
namespace profiler { namespace net { struct EasyProfilerStatus; } }
|
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
class FileReader Q_DECL_FINAL
|
2016-08-18 23:26:41 +03:00
|
|
|
{
|
2018-04-22 03:34:26 +03:00
|
|
|
enum class JobType : int8_t
|
|
|
|
{
|
|
|
|
Idle=0,
|
|
|
|
Loading,
|
|
|
|
Saving,
|
|
|
|
};
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
profiler::SerializedData m_serializedBlocks; ///<
|
|
|
|
profiler::SerializedData m_serializedDescriptors; ///<
|
|
|
|
profiler::descriptors_list_t m_descriptors; ///<
|
|
|
|
profiler::blocks_t m_blocks; ///<
|
|
|
|
profiler::thread_blocks_tree_t m_blocksTree; ///<
|
|
|
|
std::stringstream m_stream; ///<
|
|
|
|
std::stringstream m_errorMessage; ///<
|
|
|
|
QString m_filename; ///<
|
2018-04-22 03:34:26 +03:00
|
|
|
profiler::processid_t m_pid = 0; ///<
|
2018-01-28 20:52:17 +03:00
|
|
|
uint32_t m_descriptorsNumberInFile = 0; ///<
|
|
|
|
uint32_t m_version = 0; ///<
|
|
|
|
std::thread m_thread; ///<
|
|
|
|
std::atomic_bool m_bDone; ///<
|
|
|
|
std::atomic<int> m_progress; ///<
|
2018-04-22 03:34:26 +03:00
|
|
|
std::atomic<unsigned int> m_size; ///<
|
|
|
|
JobType m_jobType = JobType::Idle; ///<
|
2018-01-28 20:52:17 +03:00
|
|
|
bool m_isFile = false; ///<
|
2016-08-18 23:26:41 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
FileReader();
|
|
|
|
~FileReader();
|
2016-08-18 23:26:41 +03:00
|
|
|
|
2016-09-25 11:49:49 +03:00
|
|
|
const bool isFile() const;
|
2018-04-22 03:34:26 +03:00
|
|
|
const bool isSaving() const;
|
|
|
|
const bool isLoading() const;
|
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
bool done() const;
|
|
|
|
int progress() const;
|
|
|
|
unsigned int size() const;
|
2016-08-23 22:44:04 +03:00
|
|
|
const QString& filename() const;
|
2016-08-18 23:26:41 +03:00
|
|
|
|
2016-08-23 22:44:04 +03:00
|
|
|
void load(const QString& _filename);
|
2018-01-28 20:52:17 +03:00
|
|
|
void load(std::stringstream& _stream);
|
2018-04-22 03:34:26 +03:00
|
|
|
|
|
|
|
/** \brief Save data to file.
|
|
|
|
*/
|
|
|
|
void save(const QString& _filename, profiler::timestamp_t _beginTime, profiler::timestamp_t _endTime,
|
2018-04-25 21:37:18 +03:00
|
|
|
const profiler::SerializedData& _serializedDescriptors, const profiler::descriptors_list_t& _descriptors,
|
|
|
|
profiler::block_id_t descriptors_count, const profiler::thread_blocks_tree_t& _trees,
|
|
|
|
profiler::block_getter_fn block_getter, profiler::processid_t _pid);
|
2018-04-22 03:34:26 +03:00
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
void interrupt();
|
2018-01-28 20:52:17 +03:00
|
|
|
void get(profiler::SerializedData& _serializedBlocks, profiler::SerializedData& _serializedDescriptors,
|
2018-04-22 03:34:26 +03:00
|
|
|
profiler::descriptors_list_t& _descriptors, profiler::blocks_t& _blocks, profiler::thread_blocks_tree_t& _trees,
|
|
|
|
uint32_t& _descriptorsNumberInFile, uint32_t& _version, profiler::processid_t& _pid, QString& _filename);
|
2016-08-18 23:26:41 +03:00
|
|
|
|
2018-01-25 23:21:56 +03:00
|
|
|
void join();
|
|
|
|
|
2016-09-27 22:28:04 +03:00
|
|
|
QString getError();
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
}; // END of class FileReader.
|
2016-08-18 23:26:41 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
enum class ListenerRegime : uint8_t
|
2016-09-25 11:49:49 +03:00
|
|
|
{
|
2018-01-28 20:52:17 +03:00
|
|
|
Idle = 0,
|
|
|
|
Capture,
|
|
|
|
Capture_Receive,
|
|
|
|
Descriptors
|
2016-09-25 11:49:49 +03:00
|
|
|
};
|
|
|
|
|
2018-02-01 23:17:01 +03:00
|
|
|
class SocketListener Q_DECL_FINAL
|
2016-09-25 11:49:49 +03:00
|
|
|
{
|
2018-01-28 20:52:17 +03:00
|
|
|
EasySocket m_easySocket; ///<
|
|
|
|
std::string m_address; ///<
|
|
|
|
std::stringstream m_receivedData; ///<
|
|
|
|
std::thread m_thread; ///<
|
|
|
|
uint64_t m_receivedSize; ///<
|
|
|
|
uint16_t m_port; ///<
|
|
|
|
std::atomic<uint32_t> m_frameMax; ///<
|
|
|
|
std::atomic<uint32_t> m_frameAvg; ///<
|
|
|
|
std::atomic_bool m_bInterrupt; ///<
|
|
|
|
std::atomic_bool m_bConnected; ///<
|
|
|
|
std::atomic_bool m_bStopReceive; ///<
|
|
|
|
std::atomic_bool m_bCaptureReady; ///<
|
|
|
|
std::atomic_bool m_bFrameTimeReady; ///<
|
|
|
|
ListenerRegime m_regime; ///<
|
2016-09-25 11:49:49 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-02-01 23:17:01 +03:00
|
|
|
SocketListener();
|
|
|
|
~SocketListener();
|
2016-09-25 11:49:49 +03:00
|
|
|
|
|
|
|
bool connected() const;
|
2017-04-03 23:28:19 +03:00
|
|
|
bool captured() const;
|
2018-01-28 20:52:17 +03:00
|
|
|
ListenerRegime regime() const;
|
2016-09-25 11:49:49 +03:00
|
|
|
uint64_t size() const;
|
2018-01-28 20:52:17 +03:00
|
|
|
const std::string& address() const;
|
2016-12-08 22:22:09 +03:00
|
|
|
uint16_t port() const;
|
2016-09-25 11:49:49 +03:00
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
std::stringstream& data();
|
2016-09-25 11:49:49 +03:00
|
|
|
void clearData();
|
|
|
|
|
2017-04-17 22:13:22 +03:00
|
|
|
void disconnect();
|
2017-10-04 22:37:46 +03:00
|
|
|
void closeSocket();
|
2018-01-28 20:52:17 +03:00
|
|
|
bool connect(const char* _ipaddress, uint16_t _port, profiler::net::EasyProfilerStatus& _reply, bool _disconnectFirst = false);
|
|
|
|
bool reconnect(const char* _ipaddress, uint16_t _port, profiler::net::EasyProfilerStatus& _reply);
|
2016-09-25 11:49:49 +03:00
|
|
|
|
2016-12-18 18:27:19 +03:00
|
|
|
bool startCapture();
|
2016-09-25 11:49:49 +03:00
|
|
|
void stopCapture();
|
2017-04-03 23:28:19 +03:00
|
|
|
void finalizeCapture();
|
2016-09-25 11:49:49 +03:00
|
|
|
void requestBlocksDescription();
|
|
|
|
|
2017-04-03 23:16:36 +03:00
|
|
|
bool frameTime(uint32_t& _maxTime, uint32_t& _avgTime);
|
|
|
|
bool requestFrameTime();
|
|
|
|
|
2016-09-28 00:37:20 +03:00
|
|
|
template <class T>
|
2018-01-28 20:52:17 +03:00
|
|
|
void send(const T& _message) {
|
2016-09-28 00:37:20 +03:00
|
|
|
m_easySocket.send(&_message, sizeof(T));
|
|
|
|
}
|
2016-09-25 11:49:49 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void listenCapture();
|
|
|
|
void listenDescription();
|
2017-04-03 23:16:36 +03:00
|
|
|
void listenFrameTime();
|
2016-09-25 11:49:49 +03:00
|
|
|
|
2018-02-01 23:17:01 +03:00
|
|
|
}; // END of class SocketListener.
|
2016-09-25 11:49:49 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-02-01 23:17:01 +03:00
|
|
|
class DockWidget : public QDockWidget
|
2017-11-16 22:32:28 +03:00
|
|
|
{
|
2017-11-17 21:22:53 +03:00
|
|
|
Q_OBJECT
|
2018-02-01 23:17:01 +03:00
|
|
|
|
|
|
|
class QPushButton* m_floatingButton;
|
|
|
|
|
2017-11-17 21:22:53 +03:00
|
|
|
public:
|
2018-02-01 23:17:01 +03:00
|
|
|
|
|
|
|
explicit DockWidget(const QString& title, QWidget* parent = nullptr);
|
|
|
|
~DockWidget() override;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void toggleState();
|
|
|
|
void onTopLevelChanged();
|
|
|
|
|
|
|
|
}; // end of class DockWidget.
|
2017-11-16 22:32:28 +03:00
|
|
|
|
2018-01-25 23:21:56 +03:00
|
|
|
struct DialogWithGeometry EASY_FINAL
|
|
|
|
{
|
|
|
|
QByteArray geometry;
|
|
|
|
class QDialog* ptr = nullptr;
|
|
|
|
|
|
|
|
void create();
|
|
|
|
void saveGeometry();
|
|
|
|
void restoreGeometry();
|
2018-02-01 23:17:01 +03:00
|
|
|
|
|
|
|
}; // end of struct DialogWithGeometry.
|
2018-01-25 23:21:56 +03:00
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
class MainWindow : public QMainWindow
|
2016-06-26 20:54:16 +03:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
using This = MainWindow;
|
2018-01-25 23:21:56 +03:00
|
|
|
using Parent = QMainWindow;
|
|
|
|
|
|
|
|
DialogWithGeometry m_descTreeDialog;
|
2016-06-30 02:57:57 +03:00
|
|
|
|
2016-12-11 03:27:42 +03:00
|
|
|
QStringList m_lastFiles;
|
2017-11-26 15:37:39 +03:00
|
|
|
QString m_theme;
|
2016-09-27 21:57:46 +03:00
|
|
|
QString m_lastAddress;
|
2018-04-22 03:34:26 +03:00
|
|
|
|
|
|
|
QDockWidget* m_treeWidget = nullptr;
|
|
|
|
QDockWidget* m_graphicsView = nullptr;
|
|
|
|
QDockWidget* m_fpsViewer = nullptr;
|
2016-09-17 18:43:06 +03:00
|
|
|
|
|
|
|
#if EASY_GUI_USE_DESCRIPTORS_DOCK_WINDOW != 0
|
2016-09-18 20:20:37 +03:00
|
|
|
QDockWidget* m_descTreeWidget = nullptr;
|
2016-09-17 18:43:06 +03:00
|
|
|
#endif
|
|
|
|
|
2018-04-22 03:34:26 +03:00
|
|
|
class QProgressDialog* m_progress = nullptr;
|
|
|
|
class BlockDescriptorsWidget* m_dialogDescTree = nullptr;
|
|
|
|
class QMessageBox* m_listenerDialog = nullptr;
|
2016-08-28 18:19:12 +03:00
|
|
|
QTimer m_readerTimer;
|
2016-09-25 11:49:49 +03:00
|
|
|
QTimer m_listenerTimer;
|
2017-04-03 23:16:36 +03:00
|
|
|
QTimer m_fpsRequestTimer;
|
2018-04-22 03:34:26 +03:00
|
|
|
profiler::SerializedData m_serializedBlocks;
|
|
|
|
profiler::SerializedData m_serializedDescriptors;
|
|
|
|
FileReader m_reader;
|
|
|
|
SocketListener m_listener;
|
2016-09-13 21:42:38 +03:00
|
|
|
|
2018-04-22 03:34:26 +03:00
|
|
|
class QLineEdit* m_addressEdit = nullptr;
|
|
|
|
class QLineEdit* m_portEdit = nullptr;
|
2016-11-13 22:02:47 +03:00
|
|
|
class QLineEdit* m_frameTimeEdit = nullptr;
|
2016-09-18 20:20:37 +03:00
|
|
|
|
2016-12-11 03:27:42 +03:00
|
|
|
class QMenu* m_loadActionMenu = nullptr;
|
2018-04-22 03:34:26 +03:00
|
|
|
class QAction* m_saveAction = nullptr;
|
|
|
|
class QAction* m_deleteAction = nullptr;
|
2016-09-29 22:40:19 +03:00
|
|
|
|
2018-04-22 03:34:26 +03:00
|
|
|
class QAction* m_captureAction = nullptr;
|
|
|
|
class QAction* m_connectAction = nullptr;
|
|
|
|
class QAction* m_eventTracingEnableAction = nullptr;
|
2016-09-28 00:37:20 +03:00
|
|
|
class QAction* m_eventTracingPriorityAction = nullptr;
|
2016-09-18 18:08:47 +03:00
|
|
|
|
2016-10-02 12:13:12 +03:00
|
|
|
uint32_t m_descriptorsNumberInFile = 0;
|
2018-04-22 03:34:26 +03:00
|
|
|
uint16_t m_lastPort = 0;
|
|
|
|
bool m_bNetworkFileRegime = false;
|
|
|
|
bool m_bOpenedCacheFile = false;
|
2016-09-27 21:57:46 +03:00
|
|
|
|
2016-06-26 20:54:16 +03:00
|
|
|
public:
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
explicit MainWindow();
|
|
|
|
~MainWindow() override;
|
2016-06-26 20:54:16 +03:00
|
|
|
|
2016-08-04 23:46:04 +03:00
|
|
|
// Public virtual methods
|
|
|
|
|
2018-05-19 23:40:01 +03:00
|
|
|
void showEvent(QShowEvent* event) override;
|
2016-08-04 23:46:04 +03:00
|
|
|
void closeEvent(QCloseEvent* close_event) override;
|
2016-11-19 05:39:41 +03:00
|
|
|
void dragEnterEvent(QDragEnterEvent* drag_event) override;
|
|
|
|
void dragMoveEvent(QDragMoveEvent* drag_event) override;
|
|
|
|
void dragLeaveEvent(QDragLeaveEvent* drag_event) override;
|
|
|
|
void dropEvent(QDropEvent* drop_event) override;
|
2016-08-04 23:46:04 +03:00
|
|
|
|
2016-06-26 20:54:16 +03:00
|
|
|
protected slots:
|
|
|
|
|
2017-11-26 15:37:39 +03:00
|
|
|
void onThemeChange(bool);
|
2016-06-26 20:54:16 +03:00
|
|
|
void onOpenFileClicked(bool);
|
2016-09-29 22:40:19 +03:00
|
|
|
void onSaveFileClicked(bool);
|
2016-09-21 22:09:04 +03:00
|
|
|
void onDeleteClicked(bool);
|
2016-06-26 20:54:16 +03:00
|
|
|
void onExitClicked(bool);
|
2016-08-09 00:45:45 +03:00
|
|
|
void onEncodingChanged(bool);
|
2018-05-24 02:19:48 +03:00
|
|
|
void onRulerTextPosChanged(bool);
|
2016-11-30 21:59:40 +03:00
|
|
|
void onUnitsChanged(bool);
|
2016-09-14 23:13:38 +03:00
|
|
|
void onEnableDisableStatistics(bool);
|
2016-08-23 22:44:04 +03:00
|
|
|
void onCollapseItemsAfterCloseChanged(bool);
|
|
|
|
void onAllItemsExpandedByDefaultChange(bool);
|
2016-08-23 23:50:30 +03:00
|
|
|
void onBindExpandStatusChange(bool);
|
2016-11-20 21:01:33 +03:00
|
|
|
void onHierarchyFlagChange(bool);
|
2016-08-21 22:44:03 +03:00
|
|
|
void onExpandAllClicked(bool);
|
|
|
|
void onCollapseAllClicked(bool);
|
2018-03-15 21:01:19 +03:00
|
|
|
void onViewportInfoClicked(bool);
|
2016-11-19 04:52:45 +03:00
|
|
|
void onSpacingChange(int _value);
|
|
|
|
void onMinSizeChange(int _value);
|
|
|
|
void onNarrowSizeChange(int _value);
|
2017-04-03 23:16:36 +03:00
|
|
|
void onFpsIntervalChange(int _value);
|
|
|
|
void onFpsHistoryChange(int _value);
|
2017-04-05 22:37:40 +03:00
|
|
|
void onFpsMonitorLineWidthChange(int _value);
|
2016-08-18 23:26:41 +03:00
|
|
|
void onFileReaderTimeout();
|
2017-04-03 23:16:36 +03:00
|
|
|
void onFrameTimeRequestTimeout();
|
2016-09-25 11:49:49 +03:00
|
|
|
void onListenerTimerTimeout();
|
2016-08-18 23:26:41 +03:00
|
|
|
void onFileReaderCancel();
|
2016-09-17 15:39:31 +03:00
|
|
|
void onEditBlocksClicked(bool);
|
2016-09-17 18:43:06 +03:00
|
|
|
void onDescTreeDialogClose(int);
|
2016-09-25 11:49:49 +03:00
|
|
|
void onListenerDialogClose(int);
|
2016-09-08 21:03:05 +03:00
|
|
|
void onCaptureClicked(bool);
|
2016-09-25 11:49:49 +03:00
|
|
|
void onGetBlockDescriptionsClicked(bool);
|
2016-09-13 21:42:38 +03:00
|
|
|
void onConnectClicked(bool);
|
2016-09-28 00:37:20 +03:00
|
|
|
void onEventTracingPriorityChange(bool _checked);
|
|
|
|
void onEventTracingEnableChange(bool _checked);
|
2016-11-13 22:02:47 +03:00
|
|
|
void onFrameTimeEditFinish();
|
2017-03-07 01:09:27 +03:00
|
|
|
void onFrameTimeChanged();
|
2018-04-22 16:15:10 +03:00
|
|
|
void onSnapshotClicked(bool);
|
2016-09-13 21:42:38 +03:00
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
void onBlockStatusChange(profiler::block_id_t _id, profiler::EasyBlockStatus _status);
|
2016-09-25 11:49:49 +03:00
|
|
|
|
2018-03-13 01:28:58 +03:00
|
|
|
void onSelectValue(profiler::thread_id_t _thread_id, uint32_t _value_index, const profiler::ArbitraryValue& _value);
|
2018-03-12 01:47:20 +03:00
|
|
|
|
2017-04-03 23:16:36 +03:00
|
|
|
void checkFrameTimeReady();
|
|
|
|
|
2018-02-20 22:11:43 +03:00
|
|
|
void validateLastDir();
|
|
|
|
|
2016-06-30 21:39:04 +03:00
|
|
|
private:
|
|
|
|
|
2016-08-04 23:46:04 +03:00
|
|
|
// Private non-virtual methods
|
|
|
|
|
2018-04-22 03:34:26 +03:00
|
|
|
void closeProgressDialogAndClearReader();
|
|
|
|
void onLoadingFinish(profiler::block_index_t& _nblocks);
|
|
|
|
void onSavingFinish();
|
|
|
|
|
2018-02-01 23:17:01 +03:00
|
|
|
void configureSizes();
|
|
|
|
|
2016-10-02 12:13:12 +03:00
|
|
|
void clear();
|
|
|
|
|
2016-11-23 22:54:59 +03:00
|
|
|
void refreshDiagram();
|
|
|
|
|
2016-12-11 03:27:42 +03:00
|
|
|
void addFileToList(const QString& filename);
|
2016-08-23 22:44:04 +03:00
|
|
|
void loadFile(const QString& filename);
|
2018-01-28 20:52:17 +03:00
|
|
|
void readStream(std::stringstream& data);
|
2016-08-04 23:12:41 +03:00
|
|
|
|
2016-08-07 19:35:58 +03:00
|
|
|
void loadSettings();
|
2016-08-23 23:50:30 +03:00
|
|
|
void loadGeometry();
|
2016-09-06 22:23:55 +03:00
|
|
|
void saveSettingsAndGeometry();
|
2016-06-30 21:39:04 +03:00
|
|
|
|
2016-12-08 22:22:09 +03:00
|
|
|
void setDisconnected(bool _showMessage = true);
|
2016-11-18 22:58:44 +03:00
|
|
|
|
2017-11-27 22:02:15 +03:00
|
|
|
void destroyProgressDialog();
|
|
|
|
void createProgressDialog(const QString& text);
|
|
|
|
|
2018-05-19 23:40:01 +03:00
|
|
|
void validateLineEdits();
|
|
|
|
|
2018-01-28 20:52:17 +03:00
|
|
|
}; // END of class MainWindow.
|
2016-06-26 20:54:16 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#endif // EASY_PROFILER_GUI__MAIN_WINDOW__H
|