Changeset View
Changeset View
Standalone View
Standalone View
kcontrol/kameraconfigdialog.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
57 | setLayout(mainLayout); | 57 | setLayout(mainLayout); | ||
58 | mainLayout->addWidget(mainWidget); | 58 | mainLayout->addWidget(mainWidget); | ||
59 | mainLayout->setContentsMargins(0, 0, 0, 0); | 59 | mainLayout->setContentsMargins(0, 0, 0, 0); | ||
60 | 60 | | |||
61 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | 61 | QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok); | ||
62 | okButton->setDefault(true); | 62 | okButton->setDefault(true); | ||
63 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | 63 | okButton->setShortcut(Qt::CTRL | Qt::Key_Return); | ||
64 | 64 | | |||
65 | connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); | 65 | connect(buttonBox, &QDialogButtonBox::accepted, this, &KameraConfigDialog::accept); | ||
66 | connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); | 66 | connect(buttonBox, &QDialogButtonBox::rejected, this, &KameraConfigDialog::reject); | ||
67 | okButton->setDefault(true); | 67 | okButton->setDefault(true); | ||
68 | setModal( true ); | 68 | setModal( true ); | ||
69 | 69 | | |||
70 | QFrame *main = new QFrame(this); | 70 | QFrame *main = new QFrame(this); | ||
71 | mainLayout->addWidget(main); | 71 | mainLayout->addWidget(main); | ||
72 | 72 | | |||
73 | // Sets a layout for the frame, which is the parent of the GP_WIDGET_WINDOW | 73 | // Sets a layout for the frame, which is the parent of the GP_WIDGET_WINDOW | ||
74 | QVBoxLayout *topLayout = new QVBoxLayout(main); | 74 | QVBoxLayout *topLayout = new QVBoxLayout(main); | ||
75 | topLayout->setContentsMargins(0, 0, 0, 0); | 75 | topLayout->setContentsMargins(0, 0, 0, 0); | ||
76 | 76 | | |||
77 | m_tabWidget = 0; | 77 | m_tabWidget = 0; | ||
78 | 78 | | |||
79 | appendWidget(main, widget); | 79 | appendWidget(main, widget); | ||
80 | 80 | | |||
81 | connect(okButton,SIGNAL(clicked()),this,SLOT(slotOk())); | 81 | connect(okButton, &QPushButton::clicked, this, &KameraConfigDialog::slotOk); | ||
82 | mainLayout->addWidget(buttonBox); | 82 | mainLayout->addWidget(buttonBox); | ||
83 | } | 83 | } | ||
84 | 84 | | |||
85 | void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget) | 85 | void KameraConfigDialog::appendWidget(QWidget *parent, CameraWidget *widget) | ||
86 | { | 86 | { | ||
87 | QWidget *newParent = parent; | 87 | QWidget *newParent = parent; | ||
88 | 88 | | |||
89 | CameraWidgetType widget_type; | 89 | CameraWidgetType widget_type; | ||
▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines |