Changeset View
Changeset View
Standalone View
Standalone View
sidebar/SidebarMode.cpp
Show First 20 Lines • Show All 415 Lines • ▼ Show 20 Line(s) | 410 | { | |||
---|---|---|---|---|---|
416 | for (const QString &actionName : actionList) { | 416 | for (const QString &actionName : actionList) { | ||
417 | menu->addAction(d->collection->action(actionName)); | 417 | menu->addAction(d->collection->action(actionName)); | ||
418 | } | 418 | } | ||
419 | 419 | | |||
420 | menu->popup(position); | 420 | menu->popup(position); | ||
421 | d->setActionMenuVisible(this, true); | 421 | d->setActionMenuVisible(this, true); | ||
422 | } | 422 | } | ||
423 | 423 | | |||
424 | void SidebarMode::showIntroPage() | ||||
mart: this should be a bool property setter | |||||
425 | { | ||||
426 | d->placeHolderWidget->show(); | ||||
427 | d->moduleView->hide(); | ||||
428 | } | ||||
429 | | ||||
424 | void SidebarMode::changeModule( const QModelIndex& activeModule ) | 430 | void SidebarMode::changeModule( const QModelIndex& activeModule ) | ||
425 | { | 431 | { | ||
426 | d->moduleView->closeModules(); | 432 | d->moduleView->closeModules(); | ||
427 | 433 | | |||
428 | const int subRows = d->searchModel->rowCount(activeModule); | 434 | const int subRows = d->searchModel->rowCount(activeModule); | ||
429 | if ( subRows < 2) { | 435 | if ( subRows < 2) { | ||
430 | d->moduleView->loadModule( activeModule ); | 436 | d->moduleView->loadModule( activeModule ); | ||
431 | } else { | 437 | } else { | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
485 | 491 | | |||
486 | int SidebarMode::width() const | 492 | int SidebarMode::width() const | ||
487 | { | 493 | { | ||
488 | return d->mainWidget->width(); | 494 | return d->mainWidget->width(); | ||
489 | } | 495 | } | ||
490 | 496 | | |||
491 | bool SidebarMode::actionMenuVisible() const | 497 | bool SidebarMode::actionMenuVisible() const | ||
492 | { | 498 | { | ||
493 | return d->m_actionMenuVisible; | 499 | return d->m_actionMenuVisible; | ||
GB_2: Yes, here. | |||||
494 | } | 500 | } | ||
495 | 501 | | |||
496 | int SidebarMode::activeSubCategory() const | 502 | int SidebarMode::activeSubCategory() const | ||
497 | { | 503 | { | ||
498 | return d->activeSubCategory; | 504 | return d->activeSubCategory; | ||
499 | } | 505 | } | ||
500 | 506 | | |||
501 | void SidebarMode::initWidget() | 507 | void SidebarMode::initWidget() | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |
this should be a bool property setter