/*! \brief Constructor */ QHexPanel::QHexPanel(QWidget *p) : QPanel(p) { setFixedHeight(fontMetrics().lineSpacing()*10 + 4); hexeditor = new BINEditor::BinEditor(this); QHBoxLayout *hboxLayout = new QHBoxLayout(this); hboxLayout->setContentsMargins(0,0,0,0); hboxLayout->addWidget(hexeditor); QSpacerItem *spacerItem = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding); hboxLayout->addItem(spacerItem); QVBoxLayout *vboxLayout = new QVBoxLayout(this); hboxLayout->addLayout(vboxLayout); cbinstallTo = new QComboBox(); cbinstallTo->setMinimumSize(QSize(60, 0)); cbinstallTo->setMaximumSize(QSize(100, 16777215)); vboxLayout->addWidget(cbinstallTo); QPushButton *pbInstall = new QPushButton(); pbInstall->setText("Install"); vboxLayout->addWidget(pbInstall); connect(pbInstall,SIGNAL(clicked()),this,SLOT(install())); filltargetCB(); }
/*! \brief Constructor */ QHexPanel::QHexPanel(QWidget *p) : QPanel(p) { setFixedHeight(fontMetrics().lineSpacing()*10 + 4); setAttribute(Qt::WA_DeleteOnClose, true); hexeditor = new BINEditor::BinEditor(this); QHBoxLayout *hboxLayout = new QHBoxLayout(this); hboxLayout->setContentsMargins(0,0,0,0); hboxLayout->addWidget(hexeditor); QSpacerItem *spacerItem = new QSpacerItem(20, 10, QSizePolicy::Minimum, QSizePolicy::Expanding); hboxLayout->addItem(spacerItem); QVBoxLayout *vboxLayout = new QVBoxLayout(this); hboxLayout->addLayout(vboxLayout); QPushButton *pbClose = new QPushButton(); pbClose->setText("Close"); pbClose->setMinimumSize(QSize(60, 0)); pbClose->setMaximumSize(QSize(100, 16777215)); vboxLayout->addWidget(pbClose); connect(pbClose,SIGNAL(clicked()),this,SLOT(close())); cbinstallTo = new QComboBox(); cbinstallTo->setMinimumSize(QSize(60, 0)); cbinstallTo->setMaximumSize(QSize(100, 16777215)); vboxLayout->addWidget(cbinstallTo); // QHBoxLayout *hboxAdrLayout= new QHBoxLayout(this); // vboxLayout->addLayout(hboxAdrLayout); // hboxAdrLayout->addWidget(new QLabel("Adr:")); leTargetAdr = new QLineEdit(); leTargetAdr->setMinimumSize(QSize(60, 0)); leTargetAdr->setMaximumSize(QSize(100, 16777215)); // hboxAdrLayout->addWidget(leTargetAdr); // hboxAdrLayout->setSizeConstraint(); vboxLayout->addWidget(leTargetAdr); QPushButton *pbInstall = new QPushButton(); pbInstall->setText("Install"); pbInstall->setMinimumSize(QSize(60, 0)); pbInstall->setMaximumSize(QSize(100, 16777215)); vboxLayout->addWidget(pbInstall); connect(pbInstall,SIGNAL(clicked()),this,SLOT(install())); filltargetCB(); }