From 3eaf4f57125e47a609384cacc2147fbef4d42be0 Mon Sep 17 00:00:00 2001 From: prathamzx Date: Tue, 22 Oct 2019 14:51:19 +0530 Subject: [PATCH] Made changes for hacktoberfest! --- README.md | 5 --- latest without bookmark/login.py | 69 +++++++++++++++--------------- latest without bookmark/maptest.py | 1 - 3 files changed, 35 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index ffc6c0d..1873df8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,2 @@ # temporary Kivy app development! - -Current Status: -Login page -Register Page -Homepage diff --git a/latest without bookmark/login.py b/latest without bookmark/login.py index df7c9da..a2d2dbc 100644 --- a/latest without bookmark/login.py +++ b/latest without bookmark/login.py @@ -22,6 +22,10 @@ AllLands=list(c.execute("Select * from land")) + +class CustomDropDown(Screen,BoxLayout): + pass + class MouseWidget(BoxLayout): image=ObjectProperty() label=ObjectProperty() @@ -30,25 +34,10 @@ class MouseWidget(BoxLayout): class ConnectingSigninRegister(ScreenManager): pass -class CustomDropDown(Screen,BoxLayout): - pass class MyPopupProgressBar(Screen,BoxLayout): progress_bar = ObjectProperty() - def __init__(self, **kwa): - super( MyPopupProgressBar, self).__init__(**kwa) - - self.progress_bar = ProgressBar() - self.popup = Popup(title='Loading: {}%'.format(int(self.progress_bar.value)), - content=self.progress_bar) - self.popup.bind(on_open=self.puopen) - Clock.schedule_once(self.pop) - - def jinchurki(self, dt): - self.popup.title='Loading: {}%'.format(int(self.progress_bar.value)) - - def pop(self, instance): self.progress_bar.value = 1 self.popup.open() @@ -64,6 +53,18 @@ def puopen(self, instance): Clock.schedule_interval(self.next,1/100) Clock.schedule_interval(self.jinchurki,1/100) + def __init__(self, **kwa): + super( MyPopupProgressBar, self).__init__(**kwa) + + self.progress_bar = ProgressBar() + self.popup = Popup(title='Loading: {}%'.format(int(self.progress_bar.value)), + content=self.progress_bar) + self.popup.bind(on_open=self.puopen) + Clock.schedule_once(self.pop) + + def jinchurki(self, dt): + self.popup.title='Loading: {}%'.format(int(self.progress_bar.value)) + class HomePage(BoxLayout,Screen): cur=-1; def showland(self): @@ -257,7 +258,26 @@ def closebutton(self): conn.commit() App.get_running_app().stop() +class AddWindow(BoxLayout,Screen): + def __init__(self, **kwargs): + super().__init__(**kwargs) + def addland(self): + name=self.ids.add_land_name.text + price=self.ids.add_land_price.text + address=self.ids.add_land_address.text + area=self.ids.add_land_area.text + info=self.ids.infoAdd + if(name=="" or price=="" or address=="" or area==""): + info.text='[color=#FF0000]Please fill all the details![/color]' + else: + info.text='[color=#FF0000]Land Added Succesfully[/color]' + templist=(name,price,area,address) + c.execute("insert into land values(?,?,?,?)",templist) + + def closebutton(self): + conn.commit() + App.get_running_app().stop() class SigninWindow(BoxLayout,Screen): def __init__(self, **kwargs): @@ -314,26 +334,7 @@ def closebutton(self): conn.commit() App.get_running_app().stop() -class AddWindow(BoxLayout,Screen): - def __init__(self, **kwargs): - super().__init__(**kwargs) - - def addland(self): - name=self.ids.add_land_name.text - price=self.ids.add_land_price.text - address=self.ids.add_land_address.text - area=self.ids.add_land_area.text - info=self.ids.infoAdd - if(name=="" or price=="" or address=="" or area==""): - info.text='[color=#FF0000]Please fill all the details![/color]' - else: - info.text='[color=#FF0000]Land Added Succesfully[/color]' - templist=(name,price,area,address) - c.execute("insert into land values(?,?,?,?)",templist) - def closebutton(self): - conn.commit() - App.get_running_app().stop() kv=Builder.load_file("my1.kv") diff --git a/latest without bookmark/maptest.py b/latest without bookmark/maptest.py index e331a34..fa35bbe 100644 --- a/latest without bookmark/maptest.py +++ b/latest without bookmark/maptest.py @@ -39,7 +39,6 @@ Label: text: "Latitude: {}".format(mapview.lat) """) -#print(mapview.lon) class main(App,BoxLayout): def build(self): self.jinchuriki()