summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/test/SignalForwarder.java
blob: 8d62aae5c7b404c14a41045b20516fa74dab6ff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import org.kde.qt.*;

public class SignalForwarder extends TQDialog {

	SignalForwarder() {
		TQPushButton searchButton = new TQPushButton("Search", this);
		connect( searchButton, SIGNAL("clicked()"), this, SIGNAL("continueSearch()"));		
		connect( this, SIGNAL("continueSearch()"), this, SLOT("slotContinueSearch()"));		
	}

	public void slotContinueSearch()
	{
		System.out.println("in continueSearch()...");
	}
		
	public static void main(String[] args)
	{
		TQApplication myapp = new TQApplication(args);
		
		SignalForwarder signalForwarder = new SignalForwarder();
		myapp.setMainWidget(signalForwarder);
		signalForwarder.show();
		myapp.exec();
		
		return;
	}
	
	static {
                qtjava.initialize();
	}
}