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

Add 'Follow file' checkbox in panel #43

Merged
merged 1 commit into from Jan 27, 2019
Merged
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
1 change: 1 addition & 0 deletions src/ui/include/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ class MainWindow : public QMainWindow
InfoLine *infoLine;
QLabel* lineNbField;
QToolBar *toolBar;
QCheckBox *followCheckBox;

QAction *openAction;
QAction *closeAction;
Expand Down
8 changes: 8 additions & 0 deletions src/ui/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,19 @@ void MainWindow::createToolBars()
lineNbField->setMinimumSize(
lineNbField->fontMetrics().size( 0, "Line 0000000") );

followCheckBox = new QCheckBox("&Follow file");
followCheckBox->setLayoutDirection(Qt::RightToLeft);
connect( followAction, SIGNAL(toggled( bool )),
followCheckBox, SLOT( setChecked(bool) ) );
connect( followCheckBox, SIGNAL(toggled( bool )),
followAction, SLOT( setChecked(bool) ) );

toolBar = addToolBar( tr("&Toolbar") );
toolBar->setIconSize( QSize( 14, 14 ) );
toolBar->setMovable( false );
toolBar->addAction( openAction );
toolBar->addAction( reloadAction );
toolBar->addWidget(followCheckBox);
toolBar->addWidget( infoLine );
toolBar->addAction( stopAction );
toolBar->addWidget( lineNbField );
Expand Down