diff --git a/gui/second_page.py b/gui/second_page.py index bce7cb5..429927c 100644 --- a/gui/second_page.py +++ b/gui/second_page.py @@ -6,9 +6,6 @@ class SecondPagePanel(wx.Panel): style=wx.FULLSCREEN_NOBORDER) self.frame = parent - - - fgSizer3 = wx.FlexGridSizer(0, 1, 0, 0) fgSizer3.SetFlexibleDirection(wx.BOTH) fgSizer3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED) @@ -36,7 +33,7 @@ class SecondPagePanel(wx.Panel): # Connect Events self.m_radioBtn9.Bind(wx.EVT_LEFT_DCLICK, self.lab1) - self.m_radioBtn10.Bind(wx.EVT_LEFT_DCLICK, self.lab1) + @@ -45,6 +42,7 @@ class SecondPagePanel(wx.Panel): from labs.lab1 import lab1 nex_page = lab1.MainFrame() nex_page.Show() + class SecondPage(wx.Frame): def __init__(self, parent): diff --git a/gui/tests_template_main.py b/gui/tests_template_main.py index d9a57e2..83d359d 100644 --- a/gui/tests_template_main.py +++ b/gui/tests_template_main.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import wx + class PageOne(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) diff --git a/lab1/lab1.py b/lab1/lab1.py deleted file mode 100644 index 05d6ace..0000000 --- a/lab1/lab1.py +++ /dev/null @@ -1,54 +0,0 @@ -import wx -from docx import Document - -class Ttheory(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - - - - def get_theor(self): - doc = Document('test1.docx') - text_doc = doc.paragrapghs() - self.doc_text.SetLabel(text_doc) - - -class Labs(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - -class Results(wx.Panel): - def __init__(self, parent): - wx.Panel.__init__(self, parent) - - - -class MainFrame(wx.Frame): - def __init__(self): - wx.Frame.__init__(self, None, title="Simple Notebook Example") - - # Here we create a panel and a notebook on the panel - p = wx.Panel(self) - nb = wx.Notebook(p) - - # create the page windows as children of the notebook - page1 = Ttheory(nb) - page2 = Labs(nb) - page3 = Results(nb) - - # add the pages to the notebook with the label to show on the tab - nb.AddPage(page1, "Теория") - nb.AddPage(page2, "Задание") - nb.AddPage(page3, "Отчёт") - - # finally, put the notebook in a sizer for the panel to manage - # the layout - sizer = wx.BoxSizer() - sizer.Add(nb, 1, wx.EXPAND) - p.SetSizer(sizer) - - -if __name__ == "__main__": - app = wx.App() - MainFrame().Show() - app.MainLoop() \ No newline at end of file diff --git a/service/doc_parse.py b/service/doc_parse.py deleted file mode 100644 index e69de29..0000000 diff --git a/service/scale image.py b/service/scale image.py deleted file mode 100644 index 7e005af..0000000 --- a/service/scale image.py +++ /dev/null @@ -1,22 +0,0 @@ -import wx - -def scale_bitmap(bitmap, width, height): - image = wx.ImageFromBitmap(bitmap) - image = image.Scale(width, height, wx.IMAGE_QUALITY_HIGH) - result = wx.BitmapFromImage(image) - return result - -class Panel(wx.Panel): - def __init__(self, parent, path): - super(Panel, self).__init__(parent, -1) - bitmap = wx.Bitmap(path) - bitmap = scale_bitmap(bitmap, 300, 200) - control = wx.StaticBitmap(self, -1, bitmap) - control.SetPosition((10, 10)) - -if __name__ == '__main__': - app = wx.PySimpleApp() - frame = wx.Frame(None, -1, 'Scaled Image') - panel = Panel(frame, 'input.jpg') - frame.Show() - app.MainLoop() \ No newline at end of file diff --git a/service/test.docx b/service/test.docx deleted file mode 100644 index b2fca96..0000000 Binary files a/service/test.docx and /dev/null differ diff --git a/service/test1.py b/service/test1.py deleted file mode 100644 index b6bb955..0000000 --- a/service/test1.py +++ /dev/null @@ -1,8 +0,0 @@ -from docx import Document - -doc = Document('test.docx') -full_text = [] -for i in doc.paragraphs: - full_text.append(i.text) - -print(full_text) \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0585df2 --- /dev/null +++ b/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup, find_packages + +setup( + name='AutoDrob', + version='0.0.1', + packages=find_packages(), + url='http://danamir.ru', + license='GPLv3', + author='danamir', + author_email='danamir522@gmail.com', + description='qqqqq' +)