public void big() { if (!expand) { holder.setFixedHeight(215); this.tAbsentLabel.show(); this.tLatesLabel.show(); this.absents.show(); this.lates.show(); expandButton.setText("/\\"); expandButton.setGeometry(expandButton.x(), 170, expandButton.width(), expandButton.height()); expand = true; } else { holder.setFixedHeight(101); this.tAbsentLabel.hide(); this.tLatesLabel.hide(); this.absents.hide(); this.lates.hide(); expandButton.setText("\\/"); expandButton.setGeometry(expandButton.x(), 60, expandButton.width(), expandButton.height()); expand = false; } }
public void setupUi(QWidget Form) { expand = false; holder = new QWidget(Form); Form.layout().addWidget(holder); holder.setObjectName("holder"); holder.setGeometry(new QRect(0, 0, 621, 101)); QSizePolicy sizePolicy = new QSizePolicy( com.trolltech.qt.gui.QSizePolicy.Policy.Minimum, com.trolltech.qt.gui.QSizePolicy.Policy.Fixed); sizePolicy.setHorizontalStretch((byte) 0); sizePolicy.setVerticalStretch((byte) 0); sizePolicy.setHeightForWidth(holder.sizePolicy().hasHeightForWidth()); holder.setSizePolicy(sizePolicy); holder.setMinimumSize(new QSize(621, 101)); holder.setStyleSheet( "QWidget#holder{\n" + " background-color: rgba(52, 52, 52, 255);\n" + " border-style: solid;\n" + " border-color: rgba(255, 255, 255, 150);\n" + " border-width: 3px;\n" + "}\n" + "\n" + "QLabel{\n" + " font: 16pt \"Calibri\";\n" + " color: white;\n" + "}\n" + "\n" + "#fNameLabel, #lNameLabel, #tLatesLabel, #tAbsentLabel, #cStatusLabel, #timeLabel, #idLabel, #curclaslab, #curLoclabel, #entryLabel, #exitLabel{\n" + "font: 12pt \"Calibri\";\n" + " color: white;\n" + "}\n" + "QPushButton{\n" + " background-color: white;\n" + " border-radius: 10px;\n" + "}\n" + "\n" + "QPushButton:hover{\n" + " background-color: rgb(220, 220, 220); }\n" + "#holder:hover{\n" + " border-width: 4px; background-color:rgba(30, 30, 30, 255);\n" + "}\n" + "\n" + "#p1, #p2, #p3, #p4{\n" + " border-style: solid;\n" + " border-color: rgba(0,0,0,0);\n" + " border-width: 3px;\n" + " background-color: white;\n" + " color: black;\n" + "}\n" + "\n" + "#p1, #p2, #p3{\n" + " border-right-color: rgb(0, 0, 0);\n" + "\n" + "}"); fNameLabel = new QLabel(holder); fNameLabel.setObjectName("fNameLabel"); fNameLabel.setGeometry(new QRect(10, 0, 101, 31)); lNameLabel = new QLabel(holder); lNameLabel.setObjectName("lNameLabel"); lNameLabel.setGeometry(new QRect(10, 30, 81, 31)); tLatesLabel = new QLabel(holder); tLatesLabel.setObjectName("tLatesLabel"); tLatesLabel.setGeometry(new QRect(10, 130, 111, 31)); tAbsentLabel = new QLabel(holder); tAbsentLabel.setObjectName("tAbsentLabel"); tAbsentLabel.setGeometry(new QRect(270, 130, 111, 31)); cStatusLabel = new QLabel(holder); cStatusLabel.setObjectName("cStatusLabel"); cStatusLabel.setGeometry(new QRect(270, 0, 111, 31)); deleteButton = new QPushButton(holder); deleteButton.setObjectName("deleteButton"); deleteButton.setGeometry(new QRect(580, 10, 31, 31)); fname = new QLabel(holder); fname.setObjectName("fname"); fname.setGeometry(new QRect(120, 0, 131, 31)); lname = new QLabel(holder); lname.setObjectName("lname"); lname.setGeometry(new QRect(120, 30, 131, 31)); cStatus = new QLabel(holder); cStatus.setObjectName("cStatus"); cStatus.setGeometry(new QRect(390, 0, 101, 31)); lates = new QLabel(holder); lates.setObjectName("lates"); lates.setGeometry(new QRect(120, 130, 111, 31)); absents = new QLabel(holder); absents.setObjectName("absents"); absents.setGeometry(new QRect(390, 130, 111, 31)); absents.setStyleSheet(""); expandButton = new QPushButton(holder); expandButton.setObjectName("expandButton"); expandButton.setGeometry(new QRect(580, 60, 31, 31)); timeLabel = new QLabel(holder); timeLabel.setObjectName("timeLabel"); timeLabel.setGeometry(new QRect(10, 170, 111, 31)); idLabel = new QLabel(holder); idLabel.setObjectName("idLabel"); idLabel.setGeometry(new QRect(10, 60, 111, 31)); id = new QLabel(holder); id.setObjectName("id"); id.setGeometry(new QRect(120, 60, 131, 31)); curLoclabel = new QLabel(holder); curLoclabel.setObjectName("curLoclabel"); curLoclabel.setGeometry(new QRect(270, 100, 111, 31)); curLocation = new QLabel(holder); curLocation.setObjectName("curLocation"); curLocation.setGeometry(new QRect(390, 100, 121, 31)); curLocation.setStyleSheet(""); curclaslab = new QLabel(holder); curclaslab.setObjectName("curclaslab"); curclaslab.setGeometry(new QRect(10, 100, 111, 31)); currClass = new QLabel(holder); currClass.setObjectName("currClass"); currClass.setGeometry(new QRect(120, 100, 121, 31)); currClass.setStyleSheet(""); entryLabel = new QLabel(holder); entryLabel.setObjectName("entryLabel"); entryLabel.setGeometry(new QRect(270, 30, 121, 31)); exitLabel = new QLabel(holder); exitLabel.setObjectName("exitLabel"); exitLabel.setGeometry(new QRect(270, 60, 111, 31)); entryTime = new QLabel(holder); entryTime.setObjectName("entryTime"); entryTime.setGeometry(new QRect(390, 30, 71, 31)); exitTime = new QLabel(holder); exitTime.setObjectName("exitTime"); exitTime.setGeometry(new QRect(390, 60, 71, 31)); p1 = new QLabel(holder); p1.setObjectName("p1"); p1.setGeometry(new QRect(120, 170, 101, 31)); p2 = new QLabel(holder); p2.setObjectName("p2"); p2.setGeometry(new QRect(220, 170, 101, 31)); p3 = new QLabel(holder); p3.setObjectName("p3"); p3.setGeometry(new QRect(320, 170, 101, 31)); p4 = new QLabel(holder); p4.setObjectName("p4"); p4.setGeometry(new QRect(420, 170, 101, 31)); /* label = new QLabel(holder); label.setObjectName("label"); label.setGeometry(new QRect(480, 10, 81, 71)); label.setPixmap(new QPixmap(("classpath:admin_resource/logout.png"))); label.setScaledContents(true); */ this.expandButton.raise(); this.deleteButton.raise(); retranslateUi(Form); } // setupUi