mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-16 10:03:06 +00:00
Get rid of setSectionResizeMode helper functions.
This commit is contained in:
parent
11369131ee
commit
a3327f576c
@ -455,8 +455,8 @@ void GuiCompleter::asyncUpdatePopup()
|
|||||||
// has a bad memory about it and we have to tell him again and again.
|
// has a bad memory about it and we have to tell him again and again.
|
||||||
QTreeView * listView = static_cast<QTreeView *>(popup());
|
QTreeView * listView = static_cast<QTreeView *>(popup());
|
||||||
listView->header()->setStretchLastSection(false);
|
listView->header()->setStretchLastSection(false);
|
||||||
setSectionResizeMode(listView->header(), 0, QHeaderView::Stretch);
|
listView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||||
setSectionResizeMode(listView->header(), 1, QHeaderView::Fixed);
|
listView->header()->setSectionResizeMode(1, QHeaderView::Fixed);
|
||||||
listView->header()->resizeSection(1, 22);
|
listView->header()->resizeSection(1, 22);
|
||||||
|
|
||||||
// show/update popup
|
// show/update popup
|
||||||
|
@ -1351,7 +1351,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
numberingModule->tocTW->headerItem()->setText(0, qt_("Example"));
|
numberingModule->tocTW->headerItem()->setText(0, qt_("Example"));
|
||||||
numberingModule->tocTW->headerItem()->setText(1, qt_("Numbered"));
|
numberingModule->tocTW->headerItem()->setText(1, qt_("Numbered"));
|
||||||
numberingModule->tocTW->headerItem()->setText(2, qt_("Appears in TOC"));
|
numberingModule->tocTW->headerItem()->setText(2, qt_("Appears in TOC"));
|
||||||
setSectionResizeMode(numberingModule->tocTW->header(), QHeaderView::ResizeToContents);
|
numberingModule->tocTW->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
connect(numberingModule->linenoCB, SIGNAL(toggled(bool)),
|
connect(numberingModule->linenoCB, SIGNAL(toggled(bool)),
|
||||||
this, SLOT(linenoToggled(bool)));
|
this, SLOT(linenoToggled(bool)));
|
||||||
connect(numberingModule->linenoCB, SIGNAL(clicked()),
|
connect(numberingModule->linenoCB, SIGNAL(clicked()),
|
||||||
@ -1441,7 +1441,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
headers << qt_("Package") << qt_("Load automatically")
|
headers << qt_("Package") << qt_("Load automatically")
|
||||||
<< qt_("Load always") << qt_("Do not load");
|
<< qt_("Load always") << qt_("Do not load");
|
||||||
mathsModule->packagesTW->setHorizontalHeaderLabels(headers);
|
mathsModule->packagesTW->setHorizontalHeaderLabels(headers);
|
||||||
setSectionResizeMode(mathsModule->packagesTW->horizontalHeader(), QHeaderView::Stretch);
|
mathsModule->packagesTW->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||||
map<string, string> const & packages = BufferParams::auto_packages();
|
map<string, string> const & packages = BufferParams::auto_packages();
|
||||||
mathsModule->packagesTW->setRowCount(packages.size());
|
mathsModule->packagesTW->setRowCount(packages.size());
|
||||||
int packnum = 0;
|
int packnum = 0;
|
||||||
@ -1644,10 +1644,10 @@ GuiDocument::GuiDocument(GuiView & lv)
|
|||||||
// Modules
|
// Modules
|
||||||
modulesModule = new UiWidget<Ui::ModulesUi>(this);
|
modulesModule = new UiWidget<Ui::ModulesUi>(this);
|
||||||
modulesModule->availableLV->header()->setVisible(false);
|
modulesModule->availableLV->header()->setVisible(false);
|
||||||
setSectionResizeMode(modulesModule->availableLV->header(), QHeaderView::ResizeToContents);
|
modulesModule->availableLV->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
modulesModule->availableLV->header()->setStretchLastSection(false);
|
modulesModule->availableLV->header()->setStretchLastSection(false);
|
||||||
modulesModule->selectedLV->header()->setVisible(false);
|
modulesModule->selectedLV->header()->setVisible(false);
|
||||||
setSectionResizeMode(modulesModule->selectedLV->header(), QHeaderView::ResizeToContents);
|
modulesModule->selectedLV->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
modulesModule->selectedLV->header()->setStretchLastSection(false);
|
modulesModule->selectedLV->header()->setStretchLastSection(false);
|
||||||
selectionManager =
|
selectionManager =
|
||||||
new ModuleSelectionManager(this, modulesModule->availableLV,
|
new ModuleSelectionManager(this, modulesModule->availableLV,
|
||||||
|
@ -61,7 +61,7 @@ PanelStack::PanelStack(QWidget * parent)
|
|||||||
list_->setRootIsDecorated(false);
|
list_->setRootIsDecorated(false);
|
||||||
list_->setColumnCount(1);
|
list_->setColumnCount(1);
|
||||||
list_->header()->hide();
|
list_->header()->hide();
|
||||||
setSectionResizeMode(list_->header(), QHeaderView::ResizeToContents);
|
list_->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
list_->header()->setStretchLastSection(false);
|
list_->header()->setStretchLastSection(false);
|
||||||
list_->setMinimumSize(list_->viewport()->size());
|
list_->setMinimumSize(list_->viewport()->size());
|
||||||
|
|
||||||
|
@ -269,18 +269,6 @@ void setMessageColour(list<QWidget *> highlighted, list<QWidget *> plain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// FIXME KILLQT4: kill this function
|
|
||||||
/// wrapper to hide the change of method name to setSectionResizeMode
|
|
||||||
void setSectionResizeMode(QHeaderView * view,
|
|
||||||
int logicalIndex, QHeaderView::ResizeMode mode) {
|
|
||||||
view->setSectionResizeMode(logicalIndex, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// FIXME KILLQT4: kill this function
|
|
||||||
void setSectionResizeMode(QHeaderView * view, QHeaderView::ResizeMode mode) {
|
|
||||||
view->setSectionResizeMode(mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
void showDirectory(FileName const & directory)
|
void showDirectory(FileName const & directory)
|
||||||
{
|
{
|
||||||
if (!directory.exists())
|
if (!directory.exists())
|
||||||
|
@ -89,12 +89,6 @@ void focusAndHighlight(QAbstractItemView * w);
|
|||||||
void setMessageColour(std::list<QWidget *> highlighted,
|
void setMessageColour(std::list<QWidget *> highlighted,
|
||||||
std::list<QWidget *> plain);
|
std::list<QWidget *> plain);
|
||||||
|
|
||||||
/// Qt5 changed setSectionMode to setSectionResizeMode
|
|
||||||
/// These wrappers work for Qt4 and Qt5
|
|
||||||
void setSectionResizeMode(QHeaderView * view,
|
|
||||||
int logicalIndex, QHeaderView::ResizeMode mode);
|
|
||||||
void setSectionResizeMode(QHeaderView * view,
|
|
||||||
QHeaderView::ResizeMode mode);
|
|
||||||
/// Shows a directory in OSs file browser
|
/// Shows a directory in OSs file browser
|
||||||
void showDirectory(support::FileName const & directory);
|
void showDirectory(support::FileName const & directory);
|
||||||
/// handle request for showing citation content - shows pdf/ps or
|
/// handle request for showing citation content - shows pdf/ps or
|
||||||
|
Loading…
Reference in New Issue
Block a user