Files
Sourcetrail/src/app/qt/element/QtCodeFile.h
T
Eberhard Graether 7231ae36f6 ui: usability improvements
* darkened red of error message in status bar
* added status error when not defined startupproject
* added tooltips for remaining search view buttons
* added filepath as tooptip for title in code view
* opening file when clicking title in code view
2015-05-03 00:52:04 +02:00

53 lines
948 B
C++

#ifndef QT_CODE_FILE_H
#define QT_CODE_FILE_H
#include <memory>
#include <string>
#include <vector>
#include <QWidget>
#include "utility/file/FilePath.h"
#include "utility/types.h"
class QPushButton;
class QtCodeFileList;
class QtCodeSnippet;
class TokenLocationFile;
class QtCodeFile
: public QWidget
{
Q_OBJECT
public:
QtCodeFile(const FilePath& filePath, QtCodeFileList* parent);
virtual ~QtCodeFile();
const FilePath& getFilePath() const;
std::string getFileName() const;
const std::vector<Id>& getActiveTokenIds() const;
const std::vector<std::string>& getErrorMessages() const;
void addCodeSnippet(
uint startLineNumber,
const std::string& code,
const TokenLocationFile& locationFile
);
void update();
private slots:
void clickedTitle();
private:
QtCodeFileList* m_parent;
QPushButton* m_title;
std::vector<std::shared_ptr<QtCodeSnippet>> m_snippets;
const FilePath m_filePath;
};
#endif // QT_CODE_FILE_H