MCPcopy Create free account
hub / github.com/YACReader/yacreader / addItem

Method addItem

custom_widgets/yacreader_library_list_widget.cpp:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void YACReaderLibraryListWidget::addItem(QString name, QString path)
21{
22 QVBoxLayout *mainLayout = dynamic_cast<QVBoxLayout *>(layout());
23
24 YACReaderLibraryItemWidget *library = new YACReaderLibraryItemWidget(name, path, this);
25 connect(library, &YACReaderLibraryItemWidget::showOptions, this, &YACReaderLibraryListWidget::showContextMenu);
26 QList<YACReaderLibraryItemWidget *>::iterator itr;
27 int i = 0;
28 for (itr = librariesList.begin(); itr != librariesList.end() && !naturalSortLessThanCI(name, (*itr)->name); itr++)
29 i++;
30
31 librariesList.insert(itr, library);
32
33 // connect(library,SIGNAL(selected(QString,QString)),this,SIGNAL(librarySelected(QString,QString)));
34 // connect(library,SIGNAL(selected(QString,QString)),this,SLOT(updateLibraries(QString,QString)));
35
36 mainLayout->insertWidget(i, library);
37}
38
39QString YACReaderLibraryListWidget::currentText()
40{

Callers 14

WhatsNewDialogMethod · 0.80
populateComboMethod · 0.80
ThemeEditorDialogMethod · 0.80
OptionsDialogMethod · 0.80
populateCombosMethod · 0.80
createPublishingBoxMethod · 0.80
createGeneralTabMethod · 0.80
createLibrariesTabMethod · 0.80
newComicMethod · 0.80
addCoverTestMethod · 0.80
AddLabelDialogMethod · 0.80
openLastCreatedMethod · 0.80

Calls 2

naturalSortLessThanCIFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected