Skip to content

Instantly share code, notes, and snippets.

@ralt
Created February 25, 2015 08:08
Show Gist options
  • Save ralt/1af174f081f55467e443 to your computer and use it in GitHub Desktop.
Save ralt/1af174f081f55467e443 to your computer and use it in GitHub Desktop.
(in-package #:aeon)
(named-readtables:in-readtable :qtools)
(define-widget aeon (QWidget) ())
(define-subwidget (aeon start-button) (q+:make-qpushbutton)
(setf (q+:text start-button) "Start"))
(define-subwidget (aeon filter-text) (q+:make-qlineedit)
(setf (q+:placeholder-text filter-text) "Filter domain..."))
(define-subwidget (aeon headers-list) (q+:make-qtablewidget)
(q+:hide (q+:horizontal-header headers-list))
(q+:hide (q+:vertical-header headers-list))
(setf (q+:column-count headers-list) 2)
(setf (q+:row-count headers-list) 2)
(setf (q+:item headers-list 0 1) (q+:make-qtablewidgetitem "foo" 0))
(setf (q+:column-count headers-list) 4)
(setf (q+:item headers-list 0 3) (q+:make-qtablewidgetitem "bar" 0)))
(define-subwidget (aeon layout) (q+:make-qvboxlayout aeon)
(setf (q+:window-title aeon) "Aeon")
(let ((top-bar (q+:make-qhboxlayout)))
(q+:add-widget top-bar start-button)
(q+:add-widget top-bar filter-text)
(q+:add-layout layout top-bar))
(q+:add-widget layout headers-list))
(defun main ()
(with-main-window (window (make-instance 'aeon))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment