interfaces: remove terminal example

there is example in the TerminalInterface class documentation and in the
konsole tests

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-07 19:13:03 +03:00
parent 16f575c7e9
commit 0aea7c273e
3 changed files with 0 additions and 77 deletions

View file

@ -1,23 +0,0 @@
project(tetest)
find_package(KDELibs4 REQUIRED)
include_directories(${QT_INCLUDES} ${KDE4_INCLUDES})
add_definitions(${QT_DEFINITIONS} ${KDE_DEFINITIONS})
########### next target ###############
set(hello_SRCS main.cc )
add_executable(tetest ${hello_SRCS})
target_link_libraries(tetest
KDE4::kdecore
KDE4::kdeui
KDE4::kparts
)
########### install files ###############
install(
TARGETS tetest
DESTINATION ${KDE4_BIN_INSTALL_DIR}
)

View file

@ -1,40 +0,0 @@
#include "main.h"
#include <QtCore/QDir>
#include <kde_terminal_interface.h>
#include <KParts/Part>
#include <KService>
#include <KAboutData>
#include <KCmdLineArgs>
#include <KApplication>
Window::Window()
{
this->resize(800,600);
KService::Ptr service = KService::serviceByDesktopName("konsolepart");
Q_ASSERT(service);
KParts::ReadOnlyPart* part = service->createInstance<KParts::ReadOnlyPart>(this, this, QVariantList());
Q_ASSERT(part);
setCentralWidget( part->widget() );
TerminalInterface* interface = qobject_cast<TerminalInterface*>(part);
interface->showShellInDir(QDir::home().path());
connect(part, SIGNAL(destroyed()), this, SLOT(deleteLater()));
}
int main( int argc, char** argv )
{
KAboutData* about = new KAboutData( "tetest", 0, ki18n("TETest"), "0.1" );
KCmdLineArgs::init( argc, argv, about );
KApplication app;
Window* window = new Window();
window->show();
return app.exec();
};
#include "moc_main.cpp"

View file

@ -1,14 +0,0 @@
#ifndef MAIN_H
#define MAIN_H
#include <QObject>
#include <KMainWindow>
class Window : public KMainWindow
{
Q_OBJECT
public:
Window();
};
#endif