Example #1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    w = new Setting;
    this->setMaximumSize(306,306);
    this->setMinimumSize(306,306);
    this->setWindowTitle("PowerSet");
    /*以上为 主窗口的参数设定*/

    tray = new QSystemTrayIcon;
    icon.addFile(":/new/prefix1/C:/Users/Fuerm/Desktop/electricity-32.png");
    tray->setToolTip("PowerSet is working");
    tray->setIcon(icon);    
    tray->show();
    /*以上为 托盘的设定*/

    creatActions();
    creatMenu();
    /*以上为 托盘菜单的设定*/

    connect(ui->CancleButton,SIGNAL(clicked()),this,SLOT(CancelSlot()));
    connect(ui->ChangeButton,SIGNAL(clicked()),this,SLOT(setPlan()));
    connect(w,SIGNAL(dlgRturn(bool)),this,SLOT(SetInfoSlot(bool)));

    /*以上为 主界面上两个按钮的槽函数关联*/

    connect(tray,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(iconActivied(QSystemTrayIcon::ActivationReason)));
}
Example #2
0
DlgDependencies::DlgDependencies(QWidget *p, SoaRw *r) : QDialog(p) {

	ui.setupUi(this);
	setWindowTitle("Dependencies");

	ui.tree->setHeaderLabels(QStringList() << "Item" << "Type");

	AddDependencyItems(new QTreeWidgetItem(ui.tree), r);

	connect(ui.okButton, SIGNAL(clicked()), this, SLOT(OkSlot()));
	connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(CancelSlot()));
}
Example #3
0
DlgNewAsset::DlgNewAsset(QWidget *_parent, SoaWg *_wg, SoaTb *_tb, SoaRw *_rw) : QDialog(_parent),
	wg(_wg),
	ins(new WdgInspector(this, 0)),
	tb(_tb),
	row(_rw) {

	ins->SetRow(row);

	ui.setupUi(this);
	setWindowTitle(QString::fromStdString(tb->Name()));

	QVBoxLayout *layout = new QVBoxLayout(ui.inspectorWidget);
	layout->setContentsMargins(0, 0, 0, 0);
	layout->addWidget(ins);

	QObject::connect(ui.okButton, SIGNAL(clicked()), this, SLOT(OkSlot()));
	QObject::connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(CancelSlot()));
	QObject::connect(ins->Delegate(), SIGNAL(modifiedSignal()), this, SLOT(ModifiedSlot()));

	Check();
}
managesAdd::managesAdd(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::managesAdd)
{
    ui->setupUi(this);
    this->setWindowTitle("新增员工");             //设置标题
    QIcon icon = QIcon(":/image/manage.ico");    //注意修改这里的图片目录
    setWindowIcon(icon);

    setMaximumSize(600,430);
    setMinimumSize(600,430);

    //ui->textEdit->setReadOnly(true);                                                    //禁止显示员工信息的文本框输入信息


    setWindowFlags(Qt::CustomizeWindowHint|Qt::WindowCloseButtonHint);//去掉窗口上的问号

    QObject ::connect(ui->SubmitButton,SIGNAL(clicked()),this,SLOT(SubmitSlot()));  //提交 按钮与槽
    QObject ::connect(ui->CancelButton,SIGNAL(clicked()),this,SLOT(CancelSlot()));  //取消 按钮与槽

    QObject ::connect(ui->DesignButton,SIGNAL(clicked()),this,SLOT(DesignSlot()));  //设置头像 按钮与槽
}