[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] Qt, Qyoto buttons work intermediately
From:       linuxoid.au () gmail ! com
Date:       2010-02-16 9:29:11
Message-ID: 201002161929.11143.linuxoid.au () gmail ! com
[Download RAW message or body]


> I need the exact code please. With code snippets alone I can't reproduce what 
> you did there.

Please download the code from here: \
http://qt-giraff.svn.sourceforge.net/viewvc/qt-giraff/trunk/source/

MainApplication - main window class
startui - 1st stacked widget page
basicvideo.cs - 2nd stacked widget page

What I want to do is to take all these signals from StartVideoCodec() in \
MainApplication and corresponding SLOTS:

		private void StartVideoCodec() {
		    basicVideoPage = new QWidget();
			stackWidget.AddWidget(basicVideoPage);
			stackWidget.SetCurrentIndex(1);
			basicvideowin = new BasicVideoWindowUI();
			basicvideowin.BasicVideoUI(this, basicVideoPage);
			Connect(basicvideowin.txtSource, SIGNAL("textChanged(QString)"), this, \
SLOT("enableStart()")); // - this one  Connect(basicvideowin.btnSource, \
SIGNAL("clicked()"), this, SLOT("GetSource()")); // - this one  \
Connect(basicvideowin.btnDestination, SIGNAL("clicked()"), this, \
SLOT("GetDestination()")); // - this one  Connect(basicvideowin.btnStart, \
SIGNAL("clicked()"), this, SLOT("StartCodec()")); // - this one  \
Connect(basicvideowin.btnQuit, SIGNAL("clicked()"), qApp, SLOT("quit()")); // - this \
one  }

		[Q_SLOT]
		private void GetSource() {
			string dir = QFileDialog.GetExistingDirectory(this);
			basicvideowin.txtSource.Text = dir;
		}
		
		[Q_SLOT]
		private void GetDestination() {
			string dir = QFileDialog.GetExistingDirectory(this);
			basicvideowin.txtDestination.Text = dir;
		}
		
		[Q_SLOT]
		private void StartCodec() {
				string param = "kwrite " + QFileDialog.GetOpenFileName(this);
				QProcess play = new QProcess(this);
				play.Start(param);
		}
		
and use them from the BasicVideoWindowUI class instead. Othewise it looks like I have \
to pile up all signals/slots from all separate classes into the MainApplication \
class, otherwise they won't work. _______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic