Skip to content

Commit 283becb

Browse files
Add files via upload
1 parent 4c05699 commit 283becb

File tree

2 files changed

+278
-0
lines changed

2 files changed

+278
-0
lines changed

URL-Shortener/form.py

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# -*- coding: utf-8 -*-
2+
3+
# Form implementation generated from reading ui file 'form.ui'
4+
#
5+
# Created by: PyQt5 UI code generator 5.15.9
6+
#
7+
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
8+
# run again. Do not edit this file unless you know what you are doing.
9+
10+
11+
from PyQt5 import QtCore, QtGui, QtWidgets
12+
13+
14+
class Ui_MainWindow(object):
15+
def setupUi(self, MainWindow):
16+
MainWindow.setObjectName("MainWindow")
17+
MainWindow.resize(481, 348)
18+
self.centralwidget = QtWidgets.QWidget(MainWindow)
19+
self.centralwidget.setObjectName("centralwidget")
20+
self.label_banner = QtWidgets.QLabel(self.centralwidget)
21+
self.label_banner.setGeometry(QtCore.QRect(10, 10, 461, 101))
22+
font = QtGui.QFont()
23+
font.setPointSize(31)
24+
self.label_banner.setFont(font)
25+
self.label_banner.setStyleSheet("QLabel {\n"
26+
" color: #fff;\n"
27+
" background-color: #0000ff;\n"
28+
" border: 3px solid #0000ff;\n"
29+
" border-radius: 5px;\n"
30+
"}")
31+
self.label_banner.setAlignment(QtCore.Qt.AlignCenter)
32+
self.label_banner.setObjectName("label_banner")
33+
self.label = QtWidgets.QLabel(self.centralwidget)
34+
self.label.setGeometry(QtCore.QRect(60, 140, 41, 31))
35+
font = QtGui.QFont()
36+
font.setPointSize(14)
37+
self.label.setFont(font)
38+
self.label.setObjectName("label")
39+
self.url = QtWidgets.QLineEdit(self.centralwidget)
40+
self.url.setGeometry(QtCore.QRect(110, 140, 281, 31))
41+
font = QtGui.QFont()
42+
font.setPointSize(14)
43+
self.url.setFont(font)
44+
self.url.setStyleSheet("QLineEdit {\n"
45+
" border: 3px solid #fff;\n"
46+
" border-radius: 5px;\n"
47+
"}")
48+
self.url.setDragEnabled(True)
49+
self.url.setClearButtonEnabled(True)
50+
self.url.setObjectName("url")
51+
self.text = QtWidgets.QTextEdit(self.centralwidget)
52+
self.text.setGeometry(QtCore.QRect(10, 280, 461, 61))
53+
font = QtGui.QFont()
54+
font.setPointSize(12)
55+
self.text.setFont(font)
56+
self.text.setReadOnly(True)
57+
self.text.setObjectName("text")
58+
self.make_btn = QtWidgets.QPushButton(self.centralwidget)
59+
self.make_btn.setGeometry(QtCore.QRect(170, 190, 141, 51))
60+
font = QtGui.QFont()
61+
font.setPointSize(13)
62+
font.setKerning(False)
63+
self.make_btn.setFont(font)
64+
self.make_btn.setStyleSheet("QPushButton {\n"
65+
" color: #000;\n"
66+
" border: 3px solid #0000ff;\n"
67+
" border-radius: 5px;\n"
68+
"}\n"
69+
"QPushButton:hover {\n"
70+
" background-color: #0000ff;\n"
71+
" color: #fff;\n"
72+
"}")
73+
self.make_btn.setObjectName("make_btn")
74+
self.copy_btn = QtWidgets.QPushButton(self.centralwidget)
75+
self.copy_btn.setGeometry(QtCore.QRect(10, 250, 75, 24))
76+
self.copy_btn.setStyleSheet("QPushButton {\n"
77+
" color: #fff;\n"
78+
" background-color: #0000ff;\n"
79+
" border: 3px solid #0000ff;\n"
80+
" border-radius: 5px;\n"
81+
"}\n"
82+
"")
83+
self.copy_btn.setObjectName("copy_btn")
84+
MainWindow.setCentralWidget(self.centralwidget)
85+
86+
self.retranslateUi(MainWindow)
87+
QtCore.QMetaObject.connectSlotsByName(MainWindow)
88+
89+
def retranslateUi(self, MainWindow):
90+
_translate = QtCore.QCoreApplication.translate
91+
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
92+
self.label_banner.setText(_translate("MainWindow", "Url Shorter"))
93+
self.label.setText(_translate("MainWindow", "Url:"))
94+
self.url.setPlaceholderText(_translate("MainWindow", "Your Url..."))
95+
self.text.setPlaceholderText(_translate("MainWindow", "https://"))
96+
self.make_btn.setText(_translate("MainWindow", "Make Short Link"))
97+
self.copy_btn.setText(_translate("MainWindow", "Copy"))
98+
99+
100+
if __name__ == "__main__":
101+
import sys
102+
app = QtWidgets.QApplication(sys.argv)
103+
MainWindow = QtWidgets.QMainWindow()
104+
ui = Ui_MainWindow()
105+
ui.setupUi(MainWindow)
106+
MainWindow.show()
107+
sys.exit(app.exec_())

URL-Shortener/form.ui

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>MainWindow</class>
4+
<widget class="QMainWindow" name="MainWindow">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>481</width>
10+
<height>348</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>MainWindow</string>
15+
</property>
16+
<widget class="QWidget" name="centralwidget">
17+
<widget class="QLabel" name="label_banner">
18+
<property name="geometry">
19+
<rect>
20+
<x>10</x>
21+
<y>10</y>
22+
<width>461</width>
23+
<height>101</height>
24+
</rect>
25+
</property>
26+
<property name="font">
27+
<font>
28+
<pointsize>31</pointsize>
29+
</font>
30+
</property>
31+
<property name="styleSheet">
32+
<string notr="true">QLabel {
33+
color: #fff;
34+
background-color: #0000ff;
35+
border: 3px solid #0000ff;
36+
border-radius: 5px;
37+
}</string>
38+
</property>
39+
<property name="text">
40+
<string>Url Shorter</string>
41+
</property>
42+
<property name="alignment">
43+
<set>Qt::AlignCenter</set>
44+
</property>
45+
</widget>
46+
<widget class="QLabel" name="label">
47+
<property name="geometry">
48+
<rect>
49+
<x>60</x>
50+
<y>140</y>
51+
<width>41</width>
52+
<height>31</height>
53+
</rect>
54+
</property>
55+
<property name="font">
56+
<font>
57+
<pointsize>14</pointsize>
58+
</font>
59+
</property>
60+
<property name="text">
61+
<string>Url:</string>
62+
</property>
63+
</widget>
64+
<widget class="QLineEdit" name="url">
65+
<property name="geometry">
66+
<rect>
67+
<x>110</x>
68+
<y>140</y>
69+
<width>281</width>
70+
<height>31</height>
71+
</rect>
72+
</property>
73+
<property name="font">
74+
<font>
75+
<pointsize>14</pointsize>
76+
</font>
77+
</property>
78+
<property name="styleSheet">
79+
<string notr="true">QLineEdit {
80+
border: 3px solid #fff;
81+
border-radius: 5px;
82+
}</string>
83+
</property>
84+
<property name="dragEnabled">
85+
<bool>true</bool>
86+
</property>
87+
<property name="placeholderText">
88+
<string>Your Url...</string>
89+
</property>
90+
<property name="clearButtonEnabled">
91+
<bool>true</bool>
92+
</property>
93+
</widget>
94+
<widget class="QTextEdit" name="text">
95+
<property name="geometry">
96+
<rect>
97+
<x>10</x>
98+
<y>280</y>
99+
<width>461</width>
100+
<height>61</height>
101+
</rect>
102+
</property>
103+
<property name="font">
104+
<font>
105+
<pointsize>12</pointsize>
106+
</font>
107+
</property>
108+
<property name="readOnly">
109+
<bool>true</bool>
110+
</property>
111+
<property name="placeholderText">
112+
<string>https://</string>
113+
</property>
114+
</widget>
115+
<widget class="QPushButton" name="make_btn">
116+
<property name="geometry">
117+
<rect>
118+
<x>170</x>
119+
<y>190</y>
120+
<width>141</width>
121+
<height>51</height>
122+
</rect>
123+
</property>
124+
<property name="font">
125+
<font>
126+
<pointsize>13</pointsize>
127+
<kerning>false</kerning>
128+
</font>
129+
</property>
130+
<property name="styleSheet">
131+
<string notr="true">QPushButton {
132+
color: #000;
133+
border: 3px solid #0000ff;
134+
border-radius: 5px;
135+
}
136+
QPushButton:hover {
137+
background-color: #0000ff;
138+
color: #fff;
139+
}</string>
140+
</property>
141+
<property name="text">
142+
<string>Make Short Link</string>
143+
</property>
144+
</widget>
145+
<widget class="QPushButton" name="copy_btn">
146+
<property name="geometry">
147+
<rect>
148+
<x>10</x>
149+
<y>250</y>
150+
<width>75</width>
151+
<height>24</height>
152+
</rect>
153+
</property>
154+
<property name="styleSheet">
155+
<string notr="true">QPushButton {
156+
color: #fff;
157+
background-color: #0000ff;
158+
border: 3px solid #0000ff;
159+
border-radius: 5px;
160+
}
161+
</string>
162+
</property>
163+
<property name="text">
164+
<string>Copy</string>
165+
</property>
166+
</widget>
167+
</widget>
168+
</widget>
169+
<resources/>
170+
<connections/>
171+
</ui>

0 commit comments

Comments
 (0)