more work on smart pointer transition of PTextEdit.
This commit is contained in:
parent
f9b1ef9dcc
commit
9c2e981e2a
@ -122,8 +122,6 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
fMsr2DataParam = nullptr;
|
fMsr2DataParam = nullptr;
|
||||||
fFindReplaceData = nullptr;
|
fFindReplaceData = nullptr;
|
||||||
|
|
||||||
fTabWidget = nullptr;
|
|
||||||
|
|
||||||
// setup menus
|
// setup menus
|
||||||
setupFileActions();
|
setupFileActions();
|
||||||
setupEditActions();
|
setupEditActions();
|
||||||
@ -131,9 +129,9 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
setupMusrActions();
|
setupMusrActions();
|
||||||
setupHelpActions();
|
setupHelpActions();
|
||||||
|
|
||||||
fTabWidget = new QTabWidget( this );
|
fTabWidget = std::make_unique<QTabWidget>( this );
|
||||||
fTabWidget->setMovable(true); // allows to shuffle around tabs
|
fTabWidget->setMovable(true); // allows to shuffle around tabs
|
||||||
setCentralWidget( fTabWidget );
|
setCentralWidget( fTabWidget.get() );
|
||||||
|
|
||||||
textFamily(fAdmin->getFontName());
|
textFamily(fAdmin->getFontName());
|
||||||
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
textSize(QString("%1").arg(fAdmin->getFontSize()));
|
||||||
@ -154,7 +152,7 @@ PTextEdit::PTextEdit( QWidget *parent )
|
|||||||
fileNew();
|
fileNew();
|
||||||
}
|
}
|
||||||
|
|
||||||
connect( fTabWidget, SIGNAL( currentChanged(int) ), this, SLOT( applyFontSettings(int) ));
|
connect( fTabWidget.get(), SIGNAL( currentChanged(int) ), this, SLOT( applyFontSettings(int) ));
|
||||||
|
|
||||||
fLastDirInUse = fAdmin->getDefaultSavePath();
|
fLastDirInUse = fAdmin->getDefaultSavePath();
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ private:
|
|||||||
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
std::unique_ptr<QComboBox> fComboSize; ///< combo box for the font size
|
||||||
bool fFontChanging; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
bool fFontChanging; ///< flag needed to prevent some textChanged feature to occure when only the font changed
|
||||||
|
|
||||||
QTabWidget *fTabWidget; ///< tab widget in which the text editor(s) are placed
|
std::unique_ptr<QTabWidget> fTabWidget; ///< tab widget in which the text editor(s) are placed
|
||||||
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
QMap<PSubTextEdit*, QString> fFilenames; ///< mapper between tab widget object and filename
|
||||||
|
|
||||||
QMenu *fRecentFilesMenu; ///< recent file menu
|
QMenu *fRecentFilesMenu; ///< recent file menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user