Class: ClashSystray::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/clash-systray/app.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

Returns a new instance of Application.



13
14
15
16
# File 'lib/clash-systray/app.rb', line 13

def initialize
  @app = QApplication.new
  @systray = Systray.new
end

Class Method Details

.runObject



9
10
11
# File 'lib/clash-systray/app.rb', line 9

def self.run
  new.exec
end

Instance Method Details

#execObject



18
19
20
21
22
23
# File 'lib/clash-systray/app.rb', line 18

def exec
  Contrib::SigHandler.new(@app)

  @systray.show
  @app.exec
end