Example #1
0
StatusBar::StatusBar( QWidget* parent ) :
    QStatusBar( parent )
{
    m_statusBarView = new StatusBarView();
    m_statusBarView->setModel( Models::d() );

    connect( m_statusBarView, SIGNAL( sigStatusChanged( QString ) ), this, SLOT( slotStatusChanged( QString ) ) );
}
void AutoBarcodeScanner::createConnections() {
    // error handling
    connect(m_camera, SIGNAL(error(QCamera::Error)), this, SLOT(slotCameraError(QCamera::Error)));

    // for debugging
    connect(m_camera, SIGNAL(statusChanged(QCamera::Status)),
            this, SLOT(slotStatusChanged(QCamera::Status)));
    connect(m_camera, SIGNAL(stateChanged(QCamera::State)),
            this, SLOT(slotStateChanged(QCamera::State)));
}
void BarcodeScanner::createConnections() {
    // init connections
    connect(camera, SIGNAL(lockStatusChanged(QCamera::LockStatus, QCamera::LockChangeReason)),
            this, SLOT(slotLockStatusChanged(QCamera::LockStatus)));
    connect(imageCapture, SIGNAL(imageSaved(int, QString)), this, SLOT(slotImageSaved()));

    // error handling
    connect(camera, SIGNAL(lockFailed()), this, SLOT(slotLockFailed()));
    connect(imageCapture, SIGNAL(error(int, QCameraImageCapture::Error, const QString&)), this, SLOT(slotCaptureFailed()));
    connect(camera, SIGNAL(error(QCamera::Error)), this, SLOT(slotCameraError(QCamera::Error)));

    // to stop camera after scan process if necessary
    connect(this, SIGNAL(decodingFinished(const QString)),
            this, SLOT(slotDecodingFinished()));

    // for debugging
    connect(camera, SIGNAL(statusChanged(QCamera::Status)),
            this, SLOT(slotStatusChanged(QCamera::Status)));
    connect(camera, SIGNAL(stateChanged(QCamera::State)),
            this, SLOT(slotStateChanged(QCamera::State)));
}
Example #4
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    tcore(new ThunderCore (this)),
    tpanel(new ThunderPanel (this)),
    vpanel(new VideoPanel (this)),
    lpanel(new LogView (this)),
    bpanel(new Browser (this)),
    transf0r(new Transf0r (this)),
    osd(new OSD (this))
{
    ui->setupUi(this);
    setWindowTitle (tr("%1 $VER %2").arg(QApplication::applicationName())
                    .arg(QApplication::applicationVersion()));
    vpanel->setStatusBar(ui->statusBar);

    ui->tabWidget->addTab(tpanel, "Cloud");
    ui->tabWidget->addTab(vpanel, "Video");
    ui->tabWidget->addTab(bpanel, "Browser");
    ui->tabWidget->addTab(lpanel, "Log");
    ui->tabWidget->addTab(transf0r, "Transf0r");

    ///
    connect (tcore, SIGNAL(StatusChanged(ThunderCore::ChangeType)),
             SLOT(slotStatusChanged(ThunderCore::ChangeType)));
    connect (tcore, SIGNAL(error(QString,ThunderCore::ErrorCategory)),
             lpanel, SLOT(logReceived(QString,ThunderCore::ErrorCategory)));

    connect (tcore, SIGNAL(BTSubTaskReady(Thunder::BitorrentTask)),
             tpanel, SLOT(setBTSubTask(Thunder::BitorrentTask)));

    connect (tpanel, SIGNAL(doThisLink(Thunder::RemoteTask,
                                       ThunderPanel::RequestType,bool)),
             SLOT(slotRequestReceived(Thunder::RemoteTask,
                                      ThunderPanel::RequestType,bool)));

    connect (tpanel, SIGNAL(doIndirectRequest(ThunderPanel::IndirectRequestType)),
             SLOT(slotIndirectRequestReceived(ThunderPanel::IndirectRequestType)));

    connect (osd, SIGNAL(doubleClicked()), SLOT(slotShowOrHideWindow()));

    // WILL BE REMOVED LATER!
    connect (tcore, SIGNAL(error(QString,ThunderCore::ErrorCategory)),
             SLOT(slotError(QString,ThunderCore::ErrorCategory)));

    connect (bpanel, SIGNAL(browserLinksReady(QString)),
             SLOT(slotBrowserLinksReady(QString)));

    ///
    osd->osd_menu->addAction(ui->actionNewTask);
    osd->osd_menu->addSeparator();
    osd->osd_menu->addAction(ui->actionQ_uit);

    ///
    {
        QSettings settings;
        settings.beginGroup("UI");
        restoreState( settings.value("State").toByteArray());
        restoreGeometry( settings.value("Geometry").toByteArray() );
    }

    login ();
}
Example #5
0
ChannelList::ChannelList( QWidget* parent, KIRC::Engine *engine )
    : QWidget( parent ), m_engine( engine )
{
	ChannelListLayout = new QVBoxLayout( this, 11, 6, "ChannelListLayout");

	layout72_2 = new QHBoxLayout( 0, 0, 6, "layout72_2");

	textLabel1_2 = new QLabel( this, "textLabel1_2" );
	layout72_2->addWidget( textLabel1_2 );

	channelSearch = new QLineEdit( this, "channelSearch" );
	layout72_2->addWidget( channelSearch );

	numUsers = new QSpinBox( 0, 32767, 1, this, "num_users" );
	numUsers->setSuffix( i18n(" members") );
	layout72_2->addWidget( numUsers );

	mSearchButton = new QPushButton( this, "mSearchButton" );
	layout72_2->addWidget( mSearchButton );
	ChannelListLayout->addLayout( layout72_2 );

	mChannelList = new KListView( this, "mChannelList" );
	mChannelList->addColumn( i18n( "Channel" ) );
	mChannelList->addColumn( i18n( "Users" ) );
	mChannelList->header()->setResizeEnabled( FALSE, mChannelList->header()->count() - 1 );
	mChannelList->addColumn( i18n( "Topic" ) );
	mChannelList->setAllColumnsShowFocus( TRUE );
	mChannelList->setShowSortIndicator( TRUE );
	ChannelListLayout->addWidget( mChannelList );

	clearWState( WState_Polished );

	textLabel1_2->setText( i18n( "Search for:" ) );
	QToolTip::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
	QToolTip::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
	QWhatsThis::add( numUsers, i18n( "Channels returned must have at least this many members." ) );
	QWhatsThis::add( textLabel1_2, i18n( "You may search for channels on the IRC server for a text string entered here.  For instance, you may type 'linux' to find channels that have something to do with linux." ) );
	QToolTip::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here." ) );
	QWhatsThis::add( channelSearch, i18n( "You may search for channels on the IRC server for a text string entered here.  For instance, you may type 'linux' to find channels that have something to do with linux." ) );
	mSearchButton->setText( i18n( "S&earch" ) );
	QToolTip::add( mSearchButton, i18n( "Perform a channel search." ) );
	QWhatsThis::add( mSearchButton, i18n( "Perform a channel search.  Please be patient, as this can be slow depending on the number of channels on the server." ) );
	QToolTip::add( mChannelList, i18n( "Double click on a channel to select it." ) );
	mChannelList->header()->setLabel( 0, i18n( "Channel" ) );
	mChannelList->header()->setLabel( 1, i18n( "Users" ) );
	mChannelList->header()->setLabel( 2, i18n( "Topic" ) );

	// signals and slots connections
	connect( mChannelList, SIGNAL( doubleClicked(QListViewItem*) ),
		this, SLOT( slotItemDoubleClicked(QListViewItem*) ) );

	connect( mSearchButton, SIGNAL( clicked() ), this, SLOT( search() ) );

	connect( mChannelList, SIGNAL( selectionChanged( QListViewItem*) ), this,
		SLOT( slotItemSelected( QListViewItem *) ) );

	connect( m_engine, SIGNAL( incomingListedChan( const QString &, uint, const QString & ) ),
		this, SLOT( slotChannelListed( const QString &, uint, const QString & ) ) );

	connect( m_engine, SIGNAL( incomingEndOfList() ), this, SLOT( slotListEnd() ) );

	connect( m_engine, SIGNAL( statusChanged(KIRC::Engine::Status) ),
			this, SLOT( slotStatusChanged(KIRC::Engine::Status) ) );

	show();
}