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

Method ImportWidget

YACReaderLibrary/import_widget.cpp:82–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82ImportWidget::ImportWidget(QWidget *parent)
83 : QWidget(parent)
84{
85 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
86 setAutoFillBackground(true);
87
88 iconLabel = new QLabel();
89
90 activityIndicator = new YACReaderActivityIndicatorWidget();
91
92 text = new QLabel();
93 textDescription = new QLabel();
94 textDescription->setWordWrap(true);
95 textDescription->setMaximumWidth(330);
96 currentComicLabel = new QLabel("...");
97
98 coversViewContainer = new QWidget(this);
99 auto coversViewLayout = new QVBoxLayout;
100 coversViewContainer->setLayout(coversViewLayout);
101 coversViewContainer->setMaximumHeight(316);
102 coversViewContainer->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Maximum);
103
104 coversView = new QGraphicsView();
105 coversView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
106 coversView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
107 coversView->setMaximumHeight(300);
108
109 coversScene = new QGraphicsScene();
110 coversView->setAlignment(Qt::AlignLeft);
111 coversView->setScene(coversScene);
112 coversView->setFixedHeight(300);
113
114 coversView->setInteractive(false);
115
116 scrollAnimation = new QPropertyAnimation(coversView->horizontalScrollBar(), "value");
117
118 topDecorator = new QLabel();
119 bottomDecorator = new QLabel();
120 topDecorator->setScaledContents(true);
121 bottomDecorator->setScaledContents(true);
122
123 coversViewLayout->addWidget(topDecorator, 0);
124 coversViewLayout->addWidget(coversView, 1);
125 coversViewLayout->addWidget(bottomDecorator, 0);
126 coversViewLayout->setContentsMargins(0, 0, 0, 0);
127 coversViewLayout->setSpacing(0);
128
129 QPushButton *stop = new QPushButton(tr("stop"));
130 stop->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
131 stopButton = stop;
132
133 auto layout = new QVBoxLayout(this);
134 auto buttonLayout = new QHBoxLayout();
135 auto topLayout = new QHBoxLayout();
136 auto textLayout = new QVBoxLayout();
137
138 QWidget *topWidget = new QWidget();
139 topWidget->setFixedWidth(650);

Callers

nothing calls this directly

Calls 2

addSpacingMethod · 0.80
startMethod · 0.80

Tested by

no test coverage detected