Commit 51ddfbfa authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Changed all widgets to be resizeable.

parent 82021f48
...@@ -258,7 +258,6 @@ WUtedQt::WUtedQt(void* wu_parent_ctx, QWidget* wu_parent_wid, ...@@ -258,7 +258,6 @@ WUtedQt::WUtedQt(void* wu_parent_ctx, QWidget* wu_parent_wid,
// Apply button // Apply button
QPushButton* applybutton = new QPushButton("Apply"); QPushButton* applybutton = new QPushButton("Apply");
applybutton->setFixedSize(70, 25);
QObject::connect( QObject::connect(
applybutton, SIGNAL(clicked()), toplevel, SLOT(activate_ok())); applybutton, SIGNAL(clicked()), toplevel, SLOT(activate_ok()));
......
...@@ -274,8 +274,6 @@ WVselQt::WVselQt(pwr_tStatus* status, void* wv_parent_ctx, ...@@ -274,8 +274,6 @@ WVselQt::WVselQt(pwr_tStatus* status, void* wv_parent_ctx,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_ok())); toplevel, SLOT(activate_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -386,7 +386,7 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -386,7 +386,7 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
} }
toplevel = new WAttQtWidget(this, wa_parent_wid); toplevel = new WAttQtWidget(this, wa_parent_wid);
toplevel->setFixedSize(410, 570); toplevel->setMinimumSize(410, 570);
toplevel->setWindowTitle(fl(namep)); toplevel->setWindowTitle(fl(namep));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -457,9 +457,7 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -457,9 +457,7 @@ WAttQt::WAttQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_scrolled_ok())); toplevel, SLOT(activate_cmd_scrolled_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -199,7 +199,7 @@ WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -199,7 +199,7 @@ WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
toplevel = new WAttTextQtWidget(this, wa_parent_wid); toplevel = new WAttTextQtWidget(this, wa_parent_wid);
toplevel->setToolTip(fl("wb_watttext widget")); toplevel->setToolTip(fl("wb_watttext widget"));
toplevel->setFixedSize(800, 700); toplevel->setMinimumSize(800, 700);
toplevel->setWindowTitle(fl(namep)); toplevel->setWindowTitle(fl(namep));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -244,9 +244,6 @@ WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -244,9 +244,6 @@ WAttTextQt::WAttTextQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Apply); buttons->addButton(QDialogButtonBox::Apply);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Apply)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_ok())); toplevel, SLOT(activate_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
......
...@@ -412,8 +412,6 @@ void WdaQt::open_class_dialog(char* hierstr, char* classstr, char* namestr) ...@@ -412,8 +412,6 @@ void WdaQt::open_class_dialog(char* hierstr, char* classstr, char* namestr)
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
&wdaclass_dia, SLOT(accept())); &wdaclass_dia, SLOT(accept()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
...@@ -472,7 +470,7 @@ WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -472,7 +470,7 @@ WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
int sts; int sts;
toplevel = new WdaQtWidget(this, wa_parent_wid); toplevel = new WdaQtWidget(this, wa_parent_wid);
toplevel->setFixedSize(700, 700); toplevel->setMinimumSize(700, 700);
toplevel->setWindowTitle(fl("Spreadsheet Editor")); toplevel->setWindowTitle(fl("Spreadsheet Editor"));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -546,9 +544,7 @@ WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx, ...@@ -546,9 +544,7 @@ WdaQt::WdaQt(QWidget* wa_parent_wid, void* wa_parent_ctx,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_scrolled_ok())); toplevel, SLOT(activate_cmd_scrolled_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -166,7 +166,7 @@ void WGeQtWidget::resize(int width, int height) ...@@ -166,7 +166,7 @@ void WGeQtWidget::resize(int width, int height)
void WGeQt::set_size(int width, int height) void WGeQt::set_size(int width, int height)
{ {
toplevel->setFixedSize(width, height); toplevel->resize(width, height);
} }
void WGeQt::set_subwindow_release() void WGeQt::set_subwindow_release()
......
...@@ -82,8 +82,9 @@ public: ...@@ -82,8 +82,9 @@ public:
{ {
} }
protected:
void resize(int width, int height); void resize(int width, int height);
protected:
void focusInEvent(QFocusEvent* event); void focusInEvent(QFocusEvent* event);
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);
......
...@@ -291,8 +291,6 @@ WRevInputDialog::WRevInputDialog(WRevQt* parent_ctx, QWidget* parent, ...@@ -291,8 +291,6 @@ WRevInputDialog::WRevInputDialog(WRevQt* parent_ctx, QWidget* parent,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this,
SLOT(activate_ok())); SLOT(activate_ok()));
connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this,
......
...@@ -1521,9 +1521,7 @@ BootDialog::BootDialog(WttQt* parent_ctx, QWidget* parent) ...@@ -1521,9 +1521,7 @@ BootDialog::BootDialog(WttQt* parent_ctx, QWidget* parent)
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this,
SLOT(boot_ok_cb())); SLOT(boot_ok_cb()));
connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this,
...@@ -2439,9 +2437,6 @@ OptionsDialog::OptionsDialog(WttQt* parent_ctx, QWidget* parent) ...@@ -2439,9 +2437,6 @@ OptionsDialog::OptionsDialog(WttQt* parent_ctx, QWidget* parent)
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Apply); buttons->addButton(QDialogButtonBox::Apply);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Apply)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this,
SLOT(activate_options_ok())); SLOT(activate_options_ok()));
connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this,
......
...@@ -132,8 +132,6 @@ CoLoginQt::CoLoginQt(void* wl_parent_ctx, QWidget* wl_parent_wid, ...@@ -132,8 +132,6 @@ CoLoginQt::CoLoginQt(void* wl_parent_ctx, QWidget* wl_parent_wid,
buttons = new QDialogButtonBox(); buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_ok())); toplevel, SLOT(activate_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -58,7 +58,7 @@ MsgWindowQt::MsgWindowQt(void* msg_parent_ctx, QWidget* msg_parent_wid, ...@@ -58,7 +58,7 @@ MsgWindowQt::MsgWindowQt(void* msg_parent_ctx, QWidget* msg_parent_wid,
: MsgWindow(msg_parent_ctx, msg_name, status) : MsgWindow(msg_parent_ctx, msg_name, status)
{ {
toplevel = new MsgWindowQtWidget(this, msg_parent_wid); toplevel = new MsgWindowQtWidget(this, msg_parent_wid);
toplevel->setFixedSize(800, 600); toplevel->setMinimumSize(800, 600);
toplevel->setWindowTitle(translate_utf8(msg_name)); toplevel->setWindowTitle(translate_utf8(msg_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
...@@ -70,7 +70,7 @@ NodelistQt::NodelistQt(void* nodelist_parent_ctx, QWidget* nodelist_parent_wid, ...@@ -70,7 +70,7 @@ NodelistQt::NodelistQt(void* nodelist_parent_ctx, QWidget* nodelist_parent_wid,
toplevel = new NodelistQtWidget(this, nodelist_parent_wid); toplevel = new NodelistQtWidget(this, nodelist_parent_wid);
toplevel->setToolTip(fl("cow_statusmon_nodelist widget")); toplevel->setToolTip(fl("cow_statusmon_nodelist widget"));
toplevel->setFixedSize(850, 300); toplevel->setMinimumSize(850, 300);
toplevel->setWindowTitle(fl(nodelist_name)); toplevel->setWindowTitle(fl(nodelist_name));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -349,7 +349,7 @@ NodelistInputDialogQt::NodelistInputDialogQt( ...@@ -349,7 +349,7 @@ NodelistInputDialogQt::NodelistInputDialogQt(
const char* txt1, const char* txt2, const char* txt3, bool input_callback) const char* txt1, const char* txt2, const char* txt3, bool input_callback)
: QDialog(parent), nodelist(parent_ctx) : QDialog(parent), nodelist(parent_ctx)
{ {
setFixedSize(600, 150); setMinimumSize(600, 150);
setWindowTitle(fl(title)); setWindowTitle(fl(title));
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
......
...@@ -499,9 +499,6 @@ void CoWowQt::CreateFileSelDia(const char* title, void* parent_ctx, ...@@ -499,9 +499,6 @@ void CoWowQt::CreateFileSelDia(const char* title, void* parent_ctx,
} else if (file_type == wow_eFileSelType_Image) { } else if (file_type == wow_eFileSelType_Image) {
dcli_translate_filename(folder, "$pwrp_pop"); dcli_translate_filename(folder, "$pwrp_pop");
filter = "Images (*.png,*.jpg,*.gif,*.svg);;All Files (*)"; filter = "Images (*.png,*.jpg,*.gif,*.svg);;All Files (*)";
} else if (file_type == wow_eFileSelType_History) {
dcli_translate_filename(folder, "~");
filter = "History files (*.txt,*.csv,*.skv);;All Files (*)";
} else if (file_type == wow_eFileSelType_Backup) { } else if (file_type == wow_eFileSelType_Backup) {
dcli_translate_filename(folder, "$pwrp_load"); dcli_translate_filename(folder, "$pwrp_load");
filter = "Backup files (*.bck);;All Files (*)"; filter = "Backup files (*.bck);;All Files (*)";
...@@ -510,8 +507,8 @@ void CoWowQt::CreateFileSelDia(const char* title, void* parent_ctx, ...@@ -510,8 +507,8 @@ void CoWowQt::CreateFileSelDia(const char* title, void* parent_ctx,
// QFileDialog::getOpenFileName() is broken // QFileDialog::getOpenFileName() is broken
QFileDialog dialog(object->parent_wid, fl(title), fl(folder), filter); QFileDialog dialog(object->parent_wid, fl(title), fl(folder), filter);
dialog.setFileMode(QFileDialog::ExistingFile); dialog.setFileMode(QFileDialog::ExistingFile);
int sts = dialog.exec();
int sts = dialog.exec();
if (sts == QDialog::Accepted && dialog.selectedFiles().length() > 0) { if (sts == QDialog::Accepted && dialog.selectedFiles().length() > 0) {
pwr_tFileName fname; pwr_tFileName fname;
strcpy(fname, qPrintable(dialog.selectedFiles().first())); strcpy(fname, qPrintable(dialog.selectedFiles().first()));
...@@ -683,7 +680,7 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title, ...@@ -683,7 +680,7 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
QPixmap* image_w; QPixmap* image_w;
pwr_tFileName fname; pwr_tFileName fname;
setFixedSize(400, 150); setMinimumSize(400, 150);
setWindowTitle(fl(title)); setWindowTitle(fl(title));
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
...@@ -729,19 +726,16 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title, ...@@ -729,19 +726,16 @@ CoWowModalDialogQt::CoWowModalDialogQt(QWidget* parent, const char* title,
if (button1) { if (button1) {
QWidget* button1_w = new QPushButton(translate_utf8(button1), this); QWidget* button1_w = new QPushButton(translate_utf8(button1), this);
button1_w->setFixedSize(90, 28);
connect(button1_w, SIGNAL(clicked()), this, SLOT(modaldia_button1_cb())); connect(button1_w, SIGNAL(clicked()), this, SLOT(modaldia_button1_cb()));
hboxbuttons->addWidget(button1_w); hboxbuttons->addWidget(button1_w);
} }
if (button2) { if (button2) {
QWidget* button2_w = new QPushButton(translate_utf8(button2), this); QWidget* button2_w = new QPushButton(translate_utf8(button2), this);
button2_w->setFixedSize(90, 28);
connect(button2_w, SIGNAL(clicked()), this, SLOT(modaldia_button2_cb())); connect(button2_w, SIGNAL(clicked()), this, SLOT(modaldia_button2_cb()));
hboxbuttons->addWidget(button2_w); hboxbuttons->addWidget(button2_w);
} }
if (button3) { if (button3) {
QWidget* button3_w = new QPushButton(translate_utf8(button3), this); QWidget* button3_w = new QPushButton(translate_utf8(button3), this);
button3_w->setFixedSize(90, 28);
connect(button3_w, SIGNAL(clicked()), this, SLOT(modaldia_button3_cb())); connect(button3_w, SIGNAL(clicked()), this, SLOT(modaldia_button3_cb()));
hboxbuttons->addWidget(button3_w); hboxbuttons->addWidget(button3_w);
} }
......
...@@ -142,7 +142,7 @@ void CoXHelpQtWidget::focusInEvent(QFocusEvent* event) ...@@ -142,7 +142,7 @@ void CoXHelpQtWidget::focusInEvent(QFocusEvent* event)
void CoXHelpQt::set_dimension(int width, int height) void CoXHelpQt::set_dimension(int width, int height)
{ {
toplevel->setFixedSize(width, height); toplevel->resize(width, height);
} }
void CoXHelpQt::print() void CoXHelpQt::print()
...@@ -187,7 +187,7 @@ CoXHelpQt::CoXHelpQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -187,7 +187,7 @@ CoXHelpQt::CoXHelpQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
strcpy(title, Lng::translate("Help")); strcpy(title, Lng::translate("Help"));
toplevel = new CoXHelpQtWidget(this, xa_parent_wid); toplevel = new CoXHelpQtWidget(this, xa_parent_wid);
toplevel->setFixedSize(700, 600); toplevel->setMinimumSize(700, 600);
toplevel->setWindowTitle(fl(title)); toplevel->setWindowTitle(fl(title));
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
......
...@@ -177,9 +177,6 @@ BlockQt::BlockQt(void* b_parent_ctx, QWidget* b_parent_wid, pwr_sAttrRef* b_oar, ...@@ -177,9 +177,6 @@ BlockQt::BlockQt(void* b_parent_ctx, QWidget* b_parent_wid, pwr_sAttrRef* b_oar,
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Apply); buttons->addButton(QDialogButtonBox::Apply);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Apply)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_ok())); toplevel, SLOT(activate_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
......
...@@ -218,9 +218,6 @@ void CLogQtWidget::activate_filter() ...@@ -218,9 +218,6 @@ void CLogQtWidget::activate_filter()
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->addButton(QDialogButtonBox::Apply); buttons->addButton(QDialogButtonBox::Apply);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Apply)->setFixedSize(70, 25);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
&filter_form, SLOT(accept())); &filter_form, SLOT(accept()));
QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Apply), SIGNAL(clicked()),
......
...@@ -95,7 +95,7 @@ void XttGeQtWidget::resize(int width, int height) ...@@ -95,7 +95,7 @@ void XttGeQtWidget::resize(int width, int height)
void XttGeQt::set_size(int width, int height) void XttGeQt::set_size(int width, int height)
{ {
toplevel->setFixedSize(width, height); toplevel->resize(width, height);
} }
void XttGeQt::ge_change_value_cb(void* ge_ctx, void* value_object, char* text) void XttGeQt::ge_change_value_cb(void* ge_ctx, void* value_object, char* text)
...@@ -294,7 +294,7 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx, ...@@ -294,7 +294,7 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx,
if (options & ge_mOptions_Dialog) { if (options & ge_mOptions_Dialog) {
toplevel->setWindowFlags(Qt::Dialog); toplevel->setWindowFlags(Qt::Dialog);
toplevel->setFixedSize(window_width, window_height); toplevel->setMinimumSize(window_width, window_height);
} }
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
...@@ -331,7 +331,6 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx, ...@@ -331,7 +331,6 @@ XttGeQt::XttGeQt(QWidget* xg_parent_wid, void* xg_parent_ctx,
QObject::connect(((GraphQt*)graph)->grow_widget, QObject::connect(((GraphQt*)graph)->grow_widget,
SIGNAL(resize_signal(QResizeEvent*)), toplevel, SIGNAL(resize_signal(QResizeEvent*)), toplevel,
SLOT(action_resize(QResizeEvent*))); SLOT(action_resize(QResizeEvent*)));
// TODO: grow_widget must emit a resize_signal signal in resizeEvent()
if (xg_menu) { if (xg_menu) {
QMenuBar* menu_bar = new QMenuBar(); QMenuBar* menu_bar = new QMenuBar();
......
...@@ -101,8 +101,9 @@ public: ...@@ -101,8 +101,9 @@ public:
{ {
} }
protected:
void resize(int width, int height); void resize(int width, int height);
protected:
void focusInEvent(QFocusEvent* event); void focusInEvent(QFocusEvent* event);
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);
......
...@@ -102,7 +102,7 @@ void XttMultiViewQtWidget::resize(int width, int height) ...@@ -102,7 +102,7 @@ void XttMultiViewQtWidget::resize(int width, int height)
void XttMultiViewQt::set_size(int width, int height) void XttMultiViewQt::set_size(int width, int height)
{ {
toplevel->setFixedSize(width, height); toplevel->resize(width, height);
} }
XttMultiViewQt::~XttMultiViewQt() XttMultiViewQt::~XttMultiViewQt()
...@@ -191,12 +191,12 @@ XttMultiViewQt::XttMultiViewQt(QWidget* mv_parent_wid, void* mv_parent_ctx, ...@@ -191,12 +191,12 @@ XttMultiViewQt::XttMultiViewQt(QWidget* mv_parent_wid, void* mv_parent_ctx,
if (mv.Layout == pwr_eMultiViewLayoutEnum_Fix if (mv.Layout == pwr_eMultiViewLayoutEnum_Fix
|| mv.Layout == pwr_eMultiViewLayoutEnum_Table) { || mv.Layout == pwr_eMultiViewLayoutEnum_Table) {
toplevel->setFixedSize(window_width, window_height); toplevel->setMinimumSize(window_width, window_height);
} }
if (mv.Options & pwr_mMultiViewOptionsMask_Dialog) { if (mv.Options & pwr_mMultiViewOptionsMask_Dialog) {
toplevel->setWindowFlags(Qt::Dialog); toplevel->setWindowFlags(Qt::Dialog);
toplevel->setFixedSize(window_width, window_height); toplevel->setMinimumSize(window_width, window_height);
} }
CoWowQt::SetWindowIcon(toplevel); CoWowQt::SetWindowIcon(toplevel);
...@@ -961,7 +961,7 @@ XttMultiViewQt::XttMultiViewQt(QWidget* mv_parent_wid, void* mv_parent_ctx, ...@@ -961,7 +961,7 @@ XttMultiViewQt::XttMultiViewQt(QWidget* mv_parent_wid, void* mv_parent_ctx,
toplevel->setModal(true); toplevel->setModal(true);
} }
} else { } else {
box_widget->setFixedSize(window_width, window_height); box_widget->setMinimumSize(window_width, window_height);
} }
*sts = XNAV__SUCCESS; *sts = XNAV__SUCCESS;
......
...@@ -102,9 +102,10 @@ public: ...@@ -102,9 +102,10 @@ public:
{ {
} }
void resize(int width, int height);
protected: protected:
void focusInEvent(QFocusEvent* event); void focusInEvent(QFocusEvent* event);
void resize(int width, int height);
void closeEvent(QCloseEvent* event); void closeEvent(QCloseEvent* event);
private: private:
......
...@@ -361,7 +361,7 @@ XAttQt::XAttQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -361,7 +361,7 @@ XAttQt::XAttQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
str_StrncpyCutOff(title, title, 100, 1); str_StrncpyCutOff(title, title, 100, 1);
toplevel = new XAttQtWidget(this, xa_parent_wid); toplevel = new XAttQtWidget(this, xa_parent_wid);
toplevel->setFixedSize(420, 600); toplevel->setMinimumSize(420, 600);
toplevel->setWindowTitle(convert_utf8(title)); toplevel->setWindowTitle(convert_utf8(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -434,9 +434,7 @@ XAttQt::XAttQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -434,9 +434,7 @@ XAttQt::XAttQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_scrolled_ok())); toplevel, SLOT(activate_cmd_scrolled_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -392,7 +392,7 @@ void XColWindQt::set_title(char* t) ...@@ -392,7 +392,7 @@ void XColWindQt::set_title(char* t)
void XColWindQt::set_window_size(int w, int h) void XColWindQt::set_window_size(int w, int h)
{ {
toplevel->setFixedSize(w, h); toplevel->resize(w, h);
} }
void XColWindQt::get_window_size(int* w, int* h) void XColWindQt::get_window_size(int* w, int* h)
...@@ -434,7 +434,7 @@ XColWindQt::XColWindQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -434,7 +434,7 @@ XColWindQt::XColWindQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
toplevel = new XColWindQtWidget(this, xa_parent_wid); toplevel = new XColWindQtWidget(this, xa_parent_wid);
toplevel->setToolTip(fl("xtt_xcolwind widget")); toplevel->setToolTip(fl("xtt_xcolwind widget"));
toplevel->setFixedSize(420, 600); toplevel->setMinimumSize(420, 600);
toplevel->setWindowTitle(convert_utf8(title)); toplevel->setWindowTitle(convert_utf8(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
...@@ -562,9 +562,7 @@ XColWindQt::XColWindQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -562,9 +562,7 @@ XColWindQt::XColWindQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
QDialogButtonBox* buttons = new QDialogButtonBox(); QDialogButtonBox* buttons = new QDialogButtonBox();
buttons->addButton(QDialogButtonBox::Ok); buttons->addButton(QDialogButtonBox::Ok);
buttons->button(QDialogButtonBox::Ok)->setFixedSize(70, 25);
buttons->addButton(QDialogButtonBox::Cancel); buttons->addButton(QDialogButtonBox::Cancel);
buttons->button(QDialogButtonBox::Cancel)->setFixedSize(70, 25);
QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Ok), SIGNAL(clicked()),
toplevel, SLOT(activate_cmd_scrolled_ok())); toplevel, SLOT(activate_cmd_scrolled_ok()));
QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), QObject::connect(buttons->button(QDialogButtonBox::Cancel), SIGNAL(clicked()),
......
...@@ -119,7 +119,7 @@ XCrrQt::XCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx, ...@@ -119,7 +119,7 @@ XCrrQt::XCrrQt(QWidget* xa_parent_wid, void* xa_parent_ctx,
} }
toplevel = new XCrrQtWidget(this, xa_parent_wid); toplevel = new XCrrQtWidget(this, xa_parent_wid);
toplevel->setFixedSize(600, 420); toplevel->setMinimumSize(600, 420);
toplevel->setWindowTitle(convert_utf8(title)); toplevel->setWindowTitle(convert_utf8(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose); toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment