Guitar
Public Member Functions | Private Types | Private Attributes | List of all members
FileViewWidget Class Reference

ファイルコンテンツを表示するウィジェット More...

#include <FileViewWidget.h>

Inheritance diagram for FileViewWidget:
Inheritance graph
[legend]
Collaboration diagram for FileViewWidget:
Collaboration graph
[legend]

Public Member Functions

 FileViewWidget (QWidget *parent=nullptr)
 
void setTextCodec (QTextCodec *codec)
 
void setViewType (FileViewType type)
 
void setImage (const QString &mimetype, const QByteArray &ba, QString const &object_id, const QString &path)
 
void setText (const QList< Document::Line > *source, QMainWindow *mw, QString const &object_id, const QString &object_path)
 
void setText (const QByteArray &ba, QMainWindow *mw, const QString &object_id, const QString &object_path)
 
void setDiffMode (const TextEditorEnginePtr &editor_engine, QScrollBar *vsb, QScrollBar *hsb)
 
int lineHeight () const
 
const TextEditorThemetheme () const
 
void scrollToTop ()
 
void write (QKeyEvent *e)
 
void refrectScrollBar ()
 
void move (int cur_row, int cur_col, int scr_row, int scr_col, bool auto_scroll)
 
TextEditorViewtexteditor ()
 
const TextEditorViewtexteditor () const
 
void bind (QMainWindow *mw, FileDiffWidget *fdw, QScrollBar *vsb, QScrollBar *hsb, const TextEditorThemePtr &theme)
 
void clear ()
 
TextEditorViewgetTextEditorView ()
 

Private Types

using X_TextEditorWidget = TextEditorWidget
 
using X_ImageViewWidget = ImageViewWidget
 

Private Attributes

QVBoxLayout * ui_verticalLayout
 
QStackedWidget * ui_stackedWidget
 
QWidget * ui_page_none
 
X_TextEditorWidgetui_page_text
 
X_ImageViewWidgetui_page_image
 
QString source_id
 
FileViewType view_type = FileViewType::None
 

Detailed Description

ファイルコンテンツを表示するウィジェット

Member Typedef Documentation

◆ X_ImageViewWidget

◆ X_TextEditorWidget

Constructor & Destructor Documentation

◆ FileViewWidget()

FileViewWidget::FileViewWidget ( QWidget *  parent = nullptr)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ bind()

void FileViewWidget::bind ( QMainWindow *  mw,
FileDiffWidget fdw,
QScrollBar *  vsb,
QScrollBar *  hsb,
const TextEditorThemePtr theme 
)
Here is the call graph for this function:

◆ clear()

void FileViewWidget::clear ( )
Here is the call graph for this function:

◆ getTextEditorView()

TextEditorView* FileViewWidget::getTextEditorView ( )
inline
Here is the call graph for this function:

◆ lineHeight()

int FileViewWidget::lineHeight ( ) const
Here is the call graph for this function:

◆ move()

void FileViewWidget::move ( int  cur_row,
int  cur_col,
int  scr_row,
int  scr_col,
bool  auto_scroll 
)
Here is the call graph for this function:

◆ refrectScrollBar()

void FileViewWidget::refrectScrollBar ( )
Here is the call graph for this function:

◆ scrollToTop()

void FileViewWidget::scrollToTop ( )
Here is the call graph for this function:

◆ setDiffMode()

void FileViewWidget::setDiffMode ( const TextEditorEnginePtr editor_engine,
QScrollBar *  vsb,
QScrollBar *  hsb 
)
Here is the call graph for this function:

◆ setImage()

void FileViewWidget::setImage ( const QString &  mimetype,
const QByteArray &  ba,
QString const &  object_id,
const QString &  path 
)
Here is the call graph for this function:

◆ setText() [1/2]

void FileViewWidget::setText ( const QByteArray &  ba,
QMainWindow *  mw,
const QString &  object_id,
const QString &  object_path 
)
Here is the call graph for this function:

◆ setText() [2/2]

void FileViewWidget::setText ( const QList< Document::Line > *  source,
QMainWindow *  mw,
QString const &  object_id,
const QString &  object_path 
)
Here is the call graph for this function:

◆ setTextCodec()

void FileViewWidget::setTextCodec ( QTextCodec *  codec)
Here is the call graph for this function:

◆ setViewType()

void FileViewWidget::setViewType ( FileViewType  type)

◆ texteditor() [1/2]

const TextEditorView * FileViewWidget::texteditor ( )
Here is the call graph for this function:

◆ texteditor() [2/2]

const TextEditorView* FileViewWidget::texteditor ( ) const

◆ theme()

const TextEditorTheme * FileViewWidget::theme ( ) const
Here is the call graph for this function:

◆ write()

void FileViewWidget::write ( QKeyEvent *  e)
Here is the call graph for this function:

Member Data Documentation

◆ source_id

QString FileViewWidget::source_id
private

◆ ui_page_image

X_ImageViewWidget* FileViewWidget::ui_page_image
private

◆ ui_page_none

QWidget* FileViewWidget::ui_page_none
private

◆ ui_page_text

X_TextEditorWidget* FileViewWidget::ui_page_text
private

◆ ui_stackedWidget

QStackedWidget* FileViewWidget::ui_stackedWidget
private

◆ ui_verticalLayout

QVBoxLayout* FileViewWidget::ui_verticalLayout
private

◆ view_type

FileViewType FileViewWidget::view_type = FileViewType::None
private

The documentation for this class was generated from the following files: