imageview::imageview(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, fl) { setupUi(this); setObjectName(name ? name : "imageview"); setModal(modal); _save = _buttonBox->button(QDialogButtonBox::Save); _save->setEnabled(false); // signals and slots connections connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave())); #ifndef Q_WS_MAC _fileList->setMaximumWidth(25); #endif _imageview = new QLabel(); _imageview->setAlignment(Qt::AlignLeft | Qt::AlignTop); QScrollArea * scrollArea = new QScrollArea(); scrollArea->setWidgetResizable(true); scrollArea->setAlignment(Qt::AlignLeft | Qt::AlignTop); scrollArea->setWidget(_imageview); QHBoxLayout *layout = new QHBoxLayout; layout->setMargin(0); layout->addWidget(scrollArea); _imageFrame->setLayout(layout); shortcuts::setStandardKeys(this); }
/* * Constructs a image as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * true to construct a modal dialog. */ imageview::imageview(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); connect(_close, SIGNAL(clicked()), this, SLOT(reject())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); #ifndef Q_WS_MAC _fileList->setMaximumWidth(25); #endif _imageview = new QLabel(); _imageview->setAlignment(Qt::AlignLeft | Qt::AlignTop); QScrollArea * scrollArea = new QScrollArea(); scrollArea->setWidgetResizable(true); scrollArea->setAlignment(Qt::AlignLeft | Qt::AlignTop); scrollArea->setWidget(_imageview); QHBoxLayout *layout = new QHBoxLayout; layout->setMargin(0); layout->addWidget(scrollArea); _imageFrame->setLayout(layout); }
docAttach::docAttach(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, fl) { setupUi(this); setObjectName(name ? name : "docAttach"); setModal(modal); // signals and slots connections _save = _buttonBox->button(QDialogButtonBox::Save); _save->setEnabled(false); connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(_docType, SIGNAL(currentIndexChanged(int)), this, SLOT(sHandleButtons())); connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); _source = -1; _sourceid = -1; _targetid = -1; _urlid = -1; _mode = "new"; _po->setAllowedTypes(OrderLineEdit::Purchase); _so->setAllowedTypes(OrderLineEdit::Sales); #ifndef Q_WS_MAC _fileList->setMaximumWidth(25); #else _fileList->setMinimumWidth(60); _fileList->setMinimumHeight(32); #endif shortcuts::setStandardKeys(this); adjustSize(); }
docAttach::docAttach(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : QDialog(parent, name, modal, fl) { setupUi(this); // signals and slots connections connect(_docType, SIGNAL(currentIndexChanged(int)), this, SLOT(sHandleButtons())); connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); _source = -1; _sourceid = -1; _targetid = -1; _urlid = -1; _mode = "new"; _po->setAllowedTypes(OrderLineEdit::Purchase); _so->setAllowedTypes(OrderLineEdit::Sales); #ifndef Q_WS_MAC _fileList->setMaximumWidth(25); #else _fileList->setMinimumWidth(60); _fileList->setMinimumHeight(32); #endif adjustSize(); }
docAttach::docAttach(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : QDialog(parent, fl) { setupUi(this); setObjectName(name ? name : "docAttach"); setModal(modal); _p = new docAttachPrivate(this); _save = _buttonBox->button(QDialogButtonBox::Save); _save->setEnabled(false); connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(_docType, SIGNAL(newID(int)), this, SLOT(sHandleButtons())); connect(_filetitle, SIGNAL(textChanged(QString)), this, SLOT(sHandleButtons())); connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); connect(_save, SIGNAL(clicked()), this, SLOT(sSave())); _sourcetype = ""; _sourceid = -1; _targetid = -1; _urlid = -1; _mode = "new"; _po->setAllowedTypes(OrderLineEdit::Purchase); _so->setAllowedTypes(OrderLineEdit::Sales); _docType->populate("SELECT * FROM" "(SELECT source_docass_num, source_descrip, source_name" " FROM source" " WHERE source_widget != ''" " UNION SELECT -2, 'File', 'FILE'" " UNION SELECT -3, 'Web Site', 'URL') data" " ORDER BY source_descrip;"); #ifndef Q_OS_MAC _fileList->setMaximumWidth(25); #else _fileList->setMinimumWidth(60); _fileList->setMinimumHeight(32); #endif shortcuts::setStandardKeys(this); adjustSize(); }
image::image(QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl) : XDialog(parent, name, modal, fl) { setupUi(this); connect(_fileList, SIGNAL(clicked()), this, SLOT(sFileList())); connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject())); connect(_buttonBox, SIGNAL(accepted()), this, SLOT(sSave())); #ifndef Q_OS_MAC _fileList->setMaximumWidth(25); #endif _image = new QLabel(); _image->setAlignment(Qt::AlignLeft | Qt::AlignTop); QScrollArea * scrollArea = new QScrollArea(); scrollArea->setWidgetResizable(true); scrollArea->setAlignment(Qt::AlignLeft | Qt::AlignTop); scrollArea->setWidget(_image); QHBoxLayout *layout = new QHBoxLayout; layout->setMargin(0); layout->addWidget(scrollArea); _imageFrame->setLayout(layout); }