~emesene-team/emesene/master

« back to all changes in this revision

Viewing changes to emesene/gui/qt4ui/tests/ImageAreaSelectorTest.py

  • Committer: Riccardo (C10uD)
  • Date: 2012-07-01 16:54:34 UTC
  • Revision ID: git-v1:17ed298a3acb830f76aa2703351993cff749ed35
import2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
'''Test module for ImageAreaSelector widget'''
 
4
 
 
5
import sys
 
6
import os
 
7
 
 
8
from PyQt4 import QtGui
 
9
 
 
10
 
 
11
import gui
 
12
import e3
 
13
from gui.qt4ui import widgets
 
14
from gui.qt4ui.Dialog import Dialog
 
15
 
 
16
    
 
17
# test stuff:
 
18
class SessionStub (object):
 
19
    class ConfigDir (object):
 
20
        def get_path(*args):
 
21
            return  '/home/fastfading/src/emesene/emesene2/'\
 
22
                    'messenger.hotmail.com/'                \
 
23
                    'atarawhisky@hotmail.com/avatars/last'
 
24
    def __init__(self):
 
25
        self.config_dir = self.ConfigDir()
 
26
 
 
27
def main():
 
28
    '''Main method'''
 
29
    def test_stuff():
 
30
        '''Makes varios test stuff'''
 
31
        pass
 
32
    def response_cb(response, pixmap):
 
33
        print response, pixmap
 
34
 
 
35
    test_stuff()
 
36
    os.putenv('QT_NO_GLIB', '1')
 
37
    qapp = QtGui.QApplication(sys.argv)
 
38
    pixmap = QtGui.QPixmap('themes/images/default/logo.png')
 
39
    Dialog.crop_image(response_cb, 'themes/images/default/logo.png')
 
40
#    window.show()
 
41
#    qapp.exec_()
 
42
 
 
43
if __name__ == "__main__":
 
44
    main()
 
45