Managing windows is the job of the window manager, which is KWin if using KDE. I can only help you in the KDE case; using the DCOP interface many KDE applications provide, you will be able to do exactly what you describe calling the dcop program as follows:
Code:
dcop konqueror-[] konqueror-mainwindow#1 raise
where you should replace the [] with process number (press TAB to complete).