Exemplo n.º 1
0
Settings_window::Settings_window(QWidget *parent) 
:	QDialog(parent),
	ui_(new ::Ui::SettingsWindow),
	simple_size_filter_view_()
{
	ui_->setupUi(this);
	ui_->filters_box->removeItem(0);// It was obligatory in Qt Designer. Remove it.

	QObject::connect(ui_->apply_btn, SIGNAL(clicked()),
		this, SLOT(apply_btn_clicked()));

	QObject::connect(ui_->cancel_btn, SIGNAL(clicked()),
		this, SLOT(cancel_btn_clicked()));

	init_filters();
}
Exemplo n.º 2
0
void Loading::Init()
{
    upper_frame_ = new QFrame;
    upper_frame_->setFixedSize(300, 175);
    QString dir;
    getImageDir(dir);
    loading_movie_ = new QMovie(dir + "loading.gif");
    loading_label_ = new QLabel;
    //loading_label_->setMovie(loading_movie_);
    loading_label_->setText(STRING_PLEASE_WAIT);
    loading_movie_->start();
    tip_label_ = new QLabel;

    QHBoxLayout *upper_layout_h = new QHBoxLayout;
    //upper_layout_h->addStretch(10);
    upper_layout_h->addWidget(loading_label_,0, Qt::AlignCenter);
    //upper_layout_h->addStretch(10);
    upper_frame_->setLayout(upper_layout_h);


    bottom_frame_ = new QFrame;
    bottom_frame_->setFixedSize(539, 35);
    cancel_btn_ = new QPushButton(STRING_CANCEL);
    cancel_btn_->setFixedSize(100,25);
    QHBoxLayout *bottom_layout_h = new QHBoxLayout;
    bottom_layout_h->addStretch(10);
    bottom_layout_h->addWidget(cancel_btn_);
    bottom_frame_->setLayout(bottom_layout_h);

    QVBoxLayout *mainlayout_v = new QVBoxLayout;
    mainlayout_v->addWidget(upper_frame_);
    mainlayout_v->addWidget(tip_label_);
    //mainlayout_v->addWidget(bottom_frame_);

    setLayout(mainlayout_v);
    setWindowOpacity(1);
    setWindowFlags(Qt::FramelessWindowHint);

    connect(cancel_btn_, SIGNAL(clicked()), this, SLOT(cancel_btn_clicked()));
}