MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / handleShowOpenedFiles

Method handleShowOpenedFiles

src/plugins/codeeditor/gui/tabwidget.cpp:154–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void TabWidget::handleShowOpenedFiles(const int &x, const int &y, const QSize &size)
155{
156 int count = d->tabBar->tabCount();
157 if (count < 2)
158 return;
159
160 d->openedWidget->setWindowFlags(Qt::Popup);
161 QSize popupSize = d->openedWidget->size();
162
163 int posX = (size.width() - popupSize.width()) / 2 + x;
164 int posY = (size.height() - popupSize.height()) / 2 + y;
165
166 d->openedWidget->move(posX, posY);
167 d->openedWidget->setOpenedFiles(d->recentOpenedFiles);
168 d->openedWidget->setListViewSelection(1);
169 connect(d->openedWidget, &RecentOpenWidget::triggered, this, [=](const QModelIndex &index) {
170 d->tabBar->setCurrentIndex(d->tabBar->indexOf(index.data(RecentOpenWidget::RecentOpenedUserRole::FilePathRole).toString()));
171 });
172 d->openedWidget->show();
173 d->openedWidget->setFocusListView();
174}
175
176QWidget *TabWidgetPrivate::createSpaceWidget()
177{

Callers

nothing calls this directly

Calls 12

connectFunction · 0.85
tabCountMethod · 0.80
widthMethod · 0.80
sizeMethod · 0.45
setOpenedFilesMethod · 0.45
setListViewSelectionMethod · 0.45
setCurrentIndexMethod · 0.45
indexOfMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
showMethod · 0.45
setFocusListViewMethod · 0.45

Tested by

no test coverage detected