MCPcopy Create free account
hub / github.com/Faster3ck/Converseen / MainWindowImpl

Method MainWindowImpl

src/mainwindowimpl.cpp:45–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using namespace std;
44
45MainWindowImpl::MainWindowImpl(QWidget * parent)
46 : QMainWindow(parent)
47{
48 setupUi(this);
49
50 iAList = new QList<ImageAttributes>;
51 convertThread = new Converter(this);
52 dlgCStatus = new DialogConversionStatus(this);
53 updateChecker = new UpdateChecker();
54
55 CachingSystem::init();
56
57 connect(treeWidget, SIGNAL(dropped(QStringList, QStringList)), this, SLOT(dropped(QStringList, QStringList)));
58
59 connect(bntSelDir, SIGNAL(clicked()), this, SLOT(openOutDirectory()));
60 connect(checkSameDir, SIGNAL(stateChanged(int)), this, SLOT(setCurrentDirectory()));
61 connect(btnFormatOptions, SIGNAL(clicked()), this, SLOT(setQuality()));
62 connect(treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(onItemSelection()));
63
64 connect(spin_geoWidth, SIGNAL(editingFinished()), this, SLOT(relativeSizeW()));
65 connect(spin_geoHeight, SIGNAL(editingFinished()), this, SLOT(relativeSizeH()));
66
67 connect(comboResizeValues, SIGNAL(currentTextChanged(QString)), this, SLOT(selectGeometryUnit(QString)));
68
69 connect(checkRename, SIGNAL(stateChanged(int)), this, SLOT(enableRenameLine()));
70 connect(radioPrefixSuffix, SIGNAL(clicked()), this, SLOT(enableProgressiveSpin()));
71 connect(radioProgressive, SIGNAL(clicked()), this, SLOT(enableProgressiveSpin()));
72 connect(checkShowPreview, SIGNAL(stateChanged(int)), this, SLOT(enableShowPreview()));
73
74 connect(pushReset, SIGNAL(clicked()), this, SLOT(onPushResetClick()));
75
76 connect(convertThread, SIGNAL(nextConversion(int)), this, SLOT(nextConversion(int)));
77 connect(convertThread, SIGNAL(requestOverwrite(QString)), this, SLOT(overwriteDialog(QString)));
78 connect(convertThread, SIGNAL(errorMessage(QString)), this, SLOT(errorMessage(QString)));
79
80 connect(dlgCStatus, SIGNAL(stopProcess()), this, SLOT(stopProcess()));
81
82 connect(pushColor, SIGNAL(clicked()), this, SLOT(choseBackgroundColor()));
83
84 connect(labelPreview, SIGNAL(previewReady(int, int, double, double)), this, SLOT(showImageInformations(int, int, double, double)));
85
86 connect(checkRelative, SIGNAL(stateChanged(int)), this, SLOT(setRelativeSizeCheckboxes(int)));
87 connect(updateChecker, SIGNAL(updateAvailable(bool)), this, SLOT(updateAvailable(bool)));
88
89 createActions();
90 setupMenu();
91
92 loadFormats();
93
94 comboResizeValues->addItems((QStringList() << "%" << "px"));
95
96 adjustSize();
97 dockWidget->adjustSize();
98
99 treeWidget->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
100
101 treeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
102 createContextMenu();

Callers

nothing calls this directly

Calls 1

addItemsMethod · 0.80

Tested by

no test coverage detected