Example #1
0
KDiff3Part::KDiff3Part( QWidget *parentWidget, const char *widgetName,
                                  QObject *parent, const char *name )
    : KParts::ReadOnlyPart(parent, name)
{
    // we need an instance
    setInstance( KDiff3PartFactory::instance() );

    // this should be your custom internal widget
    m_widget = new KDiff3App( parentWidget, widgetName, this );
    
    // This hack is necessary to avoid a crash when the program terminates.
    m_bIsShell = dynamic_cast<KParts::MainWindow*>(parentWidget)!=0;

    // notify the part that this is our internal widget
    setWidget(m_widget);

    // create our actions
    //KStdAction::open(this, SLOT(fileOpen()), actionCollection());
    //KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
    //KStdAction::save(this, SLOT(save()), actionCollection());

    setXMLFile("kdiff3_part.rc");

    // we are read-write by default
    setReadWrite(true);

    // we are not modified since we haven't done anything yet
    setModified(false);
}
Example #2
0
//-------------------------------------------------------------------------------------
void TelnetHandler::onProfileEnd(const std::string& datas)
{
	sendEnter();
	pEndPoint()->send(datas.c_str(), datas.size());
	setReadWrite();
	sendEnter();
	sendNewLine();
	pProfileHandler_ = NULL;
}
VideoTab::VideoTab(QWidget *parent, CodeInterface &codInt, const bool editFlag) : QWidget(parent)
{
	code_int = &codInt;
	setupDisplay();
	getStreamNum();
	createActions();
	setReadWrite(editFlag);
	onComboSelect(0);		//Initialise
	setup_autocomplete();
}