@@ -169,7 +169,6 @@ def __init__(self, router, parent=None):
169169 self .vBoxLayout = QVBoxLayout (self .view )
170170
171171 self .__initWidget ()
172- # self.loadSamples()
173172
174173 def update_monitoring_status (self ):
175174 self .banner .update_monitoring_status ()
@@ -194,306 +193,3 @@ def __initWidget(self):
194193 # self.vBoxLayout.setSpacing(40)
195194 self .vBoxLayout .addWidget (self .banner )
196195 self .vBoxLayout .setAlignment (Qt .AlignTop )
197-
198- def loadSamples (self ):
199- """ load samples """
200- # basic input samples
201- basicInputView = SampleCardView (
202- self .tr ("Basic input samples" ), self .view )
203- basicInputView .addSampleCard (
204- icon = ":/gallery/images/controls/Button.png" ,
205- title = "Button" ,
206- content = self .tr (
207- "A control that responds to user input and emit clicked signal." ),
208- routeKey = "basicInputInterface" ,
209- index = 0
210- )
211- basicInputView .addSampleCard (
212- icon = ":/gallery/images/controls/Checkbox.png" ,
213- title = "CheckBox" ,
214- content = self .tr ("A control that a user can select or clear." ),
215- routeKey = "basicInputInterface" ,
216- index = 7
217- )
218- basicInputView .addSampleCard (
219- icon = ":/gallery/images/controls/ComboBox.png" ,
220- title = "ComboBox" ,
221- content = self .tr (
222- "A drop-down list of items a user can select from." ),
223- routeKey = "basicInputInterface" ,
224- index = 9
225- )
226- basicInputView .addSampleCard (
227- icon = ":/gallery/images/controls/DropDownButton.png" ,
228- title = "DropDownButton" ,
229- content = self .tr (
230- "A button that displays a flyout of choices when clicked." ),
231- routeKey = "basicInputInterface" ,
232- index = 11
233- )
234- basicInputView .addSampleCard (
235- icon = ":/gallery/images/controls/HyperlinkButton.png" ,
236- title = "HyperlinkButton" ,
237- content = self .tr (
238- "A button that appears as hyperlink text, and can navigate to a URI or handle a Click event." ),
239- routeKey = "basicInputInterface" ,
240- index = 16
241- )
242- basicInputView .addSampleCard (
243- icon = ":/gallery/images/controls/RadioButton.png" ,
244- title = "RadioButton" ,
245- content = self .tr (
246- "A control that allows a user to select a single option from a group of options." ),
247- routeKey = "basicInputInterface" ,
248- index = 17
249- )
250- basicInputView .addSampleCard (
251- icon = ":/gallery/images/controls/Slider.png" ,
252- title = "Slider" ,
253- content = self .tr (
254- "A control that lets the user select from a range of values by moving a Thumb control along a track." ),
255- routeKey = "basicInputInterface" ,
256- index = 18
257- )
258- basicInputView .addSampleCard (
259- icon = ":/gallery/images/controls/SplitButton.png" ,
260- title = "SplitButton" ,
261- content = self .tr (
262- "A two-part button that displays a flyout when its secondary part is clicked." ),
263- routeKey = "basicInputInterface" ,
264- index = 19
265- )
266- basicInputView .addSampleCard (
267- icon = ":/gallery/images/controls/ToggleSwitch.png" ,
268- title = "SwitchButton" ,
269- content = self .tr (
270- "A switch that can be toggled between 2 states." ),
271- routeKey = "basicInputInterface" ,
272- index = 23
273- )
274- basicInputView .addSampleCard (
275- icon = ":/gallery/images/controls/ToggleButton.png" ,
276- title = "ToggleButton" ,
277- content = self .tr (
278- "A button that can be switched between two states like a CheckBox." ),
279- routeKey = "basicInputInterface" ,
280- index = 24
281- )
282- self .vBoxLayout .addWidget (basicInputView )
283-
284- # date time samples
285- dateTimeView = SampleCardView (self .tr ('Date & time samples' ), self .view )
286- dateTimeView .addSampleCard (
287- icon = ":/gallery/images/controls/CalendarDatePicker.png" ,
288- title = "CalendarPicker" ,
289- content = self .tr ("A control that lets a user pick a date value using a calendar." ),
290- routeKey = "dateTimeInterface" ,
291- index = 0
292- )
293- dateTimeView .addSampleCard (
294- icon = ":/gallery/images/controls/DatePicker.png" ,
295- title = "DatePicker" ,
296- content = self .tr ("A control that lets a user pick a date value." ),
297- routeKey = "dateTimeInterface" ,
298- index = 2
299- )
300- dateTimeView .addSampleCard (
301- icon = ":/gallery/images/controls/TimePicker.png" ,
302- title = "TimePicker" ,
303- content = self .tr (
304- "A configurable control that lets a user pick a time value." ),
305- routeKey = "dateTimeInterface" ,
306- index = 4
307- )
308- self .vBoxLayout .addWidget (dateTimeView )
309-
310- # dialog samples
311- dialogView = SampleCardView (self .tr ('Dialog samples' ), self .view )
312- dialogView .addSampleCard (
313- icon = ":/gallery/images/controls/Flyout.png" ,
314- title = "Dialog" ,
315- content = self .tr ("A frameless message dialog." ),
316- routeKey = "dialogInterface" ,
317- index = 0
318- )
319- dialogView .addSampleCard (
320- icon = ":/gallery/images/controls/ContentDialog.png" ,
321- title = "MessageBox" ,
322- content = self .tr ("A message dialog with mask." ),
323- routeKey = "dialogInterface" ,
324- index = 1
325- )
326- dialogView .addSampleCard (
327- icon = ":/gallery/images/controls/ColorPicker.png" ,
328- title = "ColorDialog" ,
329- content = self .tr ("A dialog that allows user to select color." ),
330- routeKey = "dialogInterface" ,
331- index = 2
332- )
333- dialogView .addSampleCard (
334- icon = ":/gallery/images/controls/ColorPicker.png" ,
335- title = "TeachingTip" ,
336- content = self .tr ("A content-rich flyout for guiding users and enabling teaching moments." ),
337- routeKey = "dialogInterface" ,
338- index = 3
339- )
340- self .vBoxLayout .addWidget (dialogView )
341-
342- # layout samples
343- layoutView = SampleCardView (self .tr ('Layout samples' ), self .view )
344- layoutView .addSampleCard (
345- icon = ":/gallery/images/controls/Grid.png" ,
346- title = "FlowLayout" ,
347- content = self .tr (
348- "A layout arranges components in a left-to-right flow, wrapping to the next row when the current row is full." ),
349- routeKey = "layoutInterface" ,
350- index = 0
351- )
352- self .vBoxLayout .addWidget (layoutView )
353-
354- # material samples
355- materialView = SampleCardView (self .tr ('Material samples' ), self .view )
356- materialView .addSampleCard (
357- icon = ":/gallery/images/controls/Acrylic.png" ,
358- title = "AcrylicLabel" ,
359- content = self .tr (
360- "A translucent material recommended for panel background." ),
361- routeKey = "materialInterface" ,
362- index = 0
363- )
364- self .vBoxLayout .addWidget (materialView )
365-
366- # menu samples
367- menuView = SampleCardView (self .tr ('Menu samples' ), self .view )
368- menuView .addSampleCard (
369- icon = ":/gallery/images/controls/MenuFlyout.png" ,
370- title = "RoundMenu" ,
371- content = self .tr (
372- "Shows a contextual list of simple commands or options." ),
373- routeKey = "menuInterface" ,
374- index = 0
375- )
376- self .vBoxLayout .addWidget (menuView )
377-
378- # navigation
379- navigationView = SampleCardView (self .tr ('Navigation' ), self .view )
380- navigationView .addSampleCard (
381- icon = ":/gallery/images/controls/Pivot.png" ,
382- title = "Pivot" ,
383- content = self .tr (
384- "Presents information from different sources in a tabbed view." ),
385- routeKey = "navigationViewInterface" ,
386- index = 0
387- )
388- self .vBoxLayout .addWidget (navigationView )
389-
390- # scroll samples
391- scrollView = SampleCardView (self .tr ('Scrolling samples' ), self .view )
392- scrollView .addSampleCard (
393- icon = ":/gallery/images/controls/ScrollViewer.png" ,
394- title = "ScrollArea" ,
395- content = self .tr (
396- "A container control that lets the user pan and zoom its content smoothly." ),
397- routeKey = "scrollInterface" ,
398- index = 0
399- )
400- self .vBoxLayout .addWidget (scrollView )
401-
402- # state info samples
403- stateInfoView = SampleCardView (self .tr ('Status & info samples' ), self .view )
404- stateInfoView .addSampleCard (
405- icon = ":/gallery/images/controls/ProgressRing.png" ,
406- title = "StateToolTip" ,
407- content = self .tr (
408- "Shows the apps progress on a task, or that the app is performing ongoing work that does block user interaction." ),
409- routeKey = "statusInfoInterface" ,
410- index = 0
411- )
412- stateInfoView .addSampleCard (
413- icon = ":/gallery/images/controls/InfoBar.png" ,
414- title = "InfoBar" ,
415- content = self .tr (
416- "An inline message to display app-wide status change information." ),
417- routeKey = "statusInfoInterface" ,
418- index = 3
419- )
420- stateInfoView .addSampleCard (
421- icon = ":/gallery/images/controls/ProgressBar.png" ,
422- title = "ProgressBar" ,
423- content = self .tr (
424- "Shows the apps progress on a task, or that the app is performing ongoing work that doesn't block user interaction." ),
425- routeKey = "statusInfoInterface" ,
426- index = 7
427- )
428- stateInfoView .addSampleCard (
429- icon = ":/gallery/images/controls/ProgressRing.png" ,
430- title = "ProgressRing" ,
431- content = self .tr (
432- "Shows the apps progress on a task, or that the app is performing ongoing work that doesn't block user interaction." ),
433- routeKey = "statusInfoInterface" ,
434- index = 9
435- )
436- stateInfoView .addSampleCard (
437- icon = ":/gallery/images/controls/ToolTip.png" ,
438- title = "ToolTip" ,
439- content = self .tr (
440- "Displays information for an element in a pop-up window." ),
441- routeKey = "statusInfoInterface" ,
442- index = 1
443- )
444- self .vBoxLayout .addWidget (stateInfoView )
445-
446- # text samples
447- textView = SampleCardView (self .tr ('Text samples' ), self .view )
448- textView .addSampleCard (
449- icon = ":/gallery/images/controls/TextBox.png" ,
450- title = "LineEdit" ,
451- content = self .tr ("A single-line plain text field." ),
452- routeKey = "textInterface" ,
453- index = 0
454- )
455- textView .addSampleCard (
456- icon = ":/gallery/images/controls/NumberBox.png" ,
457- title = "SpinBox" ,
458- content = self .tr (
459- "A text control used for numeric input and evaluation of algebraic equations." ),
460- routeKey = "textInterface" ,
461- index = 1
462- )
463- textView .addSampleCard (
464- icon = ":/gallery/images/controls/RichEditBox.png" ,
465- title = "TextEdit" ,
466- content = self .tr (
467- "A rich text editing control that supports formatted text, hyperlinks, and other rich content." ),
468- routeKey = "textInterface" ,
469- index = 6
470- )
471- self .vBoxLayout .addWidget (textView )
472-
473- # view samples
474- collectionView = SampleCardView (self .tr ('View samples' ), self .view )
475- collectionView .addSampleCard (
476- icon = ":/gallery/images/controls/ListView.png" ,
477- title = "ListView" ,
478- content = self .tr (
479- "A control that presents a collection of items in a vertical list." ),
480- routeKey = "viewInterface" ,
481- index = 0
482- )
483- collectionView .addSampleCard (
484- icon = ":/gallery/images/controls/DataGrid.png" ,
485- title = "TableView" ,
486- content = self .tr (
487- "The DataGrid control provides a flexible way to display a collection of data in rows and columns." ),
488- routeKey = "viewInterface" ,
489- index = 1
490- )
491- collectionView .addSampleCard (
492- icon = ":/gallery/images/controls/TreeView.png" ,
493- title = "TreeView" ,
494- content = self .tr (
495- "The TreeView control is a hierarchical list pattern with expanding and collapsing nodes that contain nested items." ),
496- routeKey = "viewInterface" ,
497- index = 2
498- )
499- self .vBoxLayout .addWidget (collectionView )
0 commit comments